![]() |
|
[C#] Need Help Selecting Element [Selenium C#] - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [C#] Need Help Selecting Element [Selenium C#] (/showthread.php?tid=5715126) |
Need Help Selecting Element [Selenium C#] - FryPan - Sep 10, 2017 Code <select class="ui-textfield ui-textfield-system sa-error-field" style="display: inline-block;">Tried XPath, CSSSelector etc, it always says that it can't find the element. Help would be much appreciated! Full "outer" code. I'm trying to select the element and use "SelectByValue" to choose the item "London". PHP Code * - severos - Sep 10, 2017 Are you sure you've written the correct css selector?? * - uint32 - Sep 11, 2017 I think you've got a wrong XPath selector. Try this: Code //option[@value='Aberdeenshire']//: select all option: select option nodes []: node descriptior @: attribute value: atribute named value ='(value)': expected value |