william_roe
10 years agoSuper Contributor
Get All Input Elements on Screen via FindChildByXPath
I've used FindChildByXPath to find first TD with click event (see below) but how do I get all controls on a page of a certain types (i.e. TextBoxes, Images, Tables, etc)? var page = Sys.Browser...
- 10 years ago
Hi William,
Sorry for the late reply. If by "disabled" you mean any of these:
<input type="hidden" .../> <input type="text" disabled .../> <input type="text" readonly .../>
then the query for enabled inputs shoud be something like:
var arr = page.EvaluateXPath("//input[@type!='hidden' and not (@readonly or @disabled)]", true);