|
|
@@ -598,7 +598,8 @@ export class OrderManagementPage {
|
|
|
const getValueByLabel = async (labelText: string | RegExp): Promise<string | undefined> => {
|
|
|
const label = dialog.locator('generic').filter({ hasText: labelText }).first();
|
|
|
if (await label.count() > 0) {
|
|
|
- const value = label.locator('..').locator('generic').nth(1);
|
|
|
+ // 使用 XPath 获取下一个兄弟 generic 元素(值元素)
|
|
|
+ const value = label.locator('xpath=following-sibling::generic');
|
|
|
if (await value.count() > 0) {
|
|
|
const text = await value.textContent();
|
|
|
return text?.trim() || undefined;
|