Fix click element in WebDriver.

This commit is contained in:
Haiping Chen 2024-01-03 15:10:53 -06:00
parent 6cad3aa5f5
commit 5dee99ba9b
2 changed files with 3 additions and 3 deletions

View file

@ -14,7 +14,7 @@ public partial class PlaywrightWebDriver
foreach (var a in anchors)
{
var text = await a.TextContentAsync();
str.Add($"<a>{text}</a>");
str.Add($"<a>{(string.IsNullOrEmpty(text) ? "EMPTY" : text)}</a>");
}
var buttons = await body.QuerySelectorAllAsync("button");

View file

@ -10,7 +10,7 @@
"description": "website url."
}
},
"required": []
"required": ["url"]
}
},
{
@ -42,7 +42,7 @@
"description": "user input."
}
},
"required": ["element_name"]
"required": ["element_name", "input_text"]
}
}
]