CaptainBeardsEyesBeard 3 Posted August 5, 2020 Share Posted August 5, 2020 HI I'm wondering why I'm having such issues selecting this dropdown <select class="form-control valid" onchange="showRelationship()" id="Client_HasRelationshipWithExistingClient" name="Client.HasRelationshipWithExistingClient" aria-invalid="false"> <option value="0" selected="selected">No</option> <option value="1">Yes</option> </select> So I tried this way $Client_RelationshipInformationDropdownID = _IEGetObjById($oIE, "Client_RelationshipInformation") _IEAction($Client_RelationshipInformationDropdownID, "focus") ;_IEFormElementOptionSelect($Client_RelationshipInformationDropdownID, 1) and also this way _IEFormElementOptionSelect($Client_RelationshipInformationDropdownID, "Yes", 1, "byText") But it won't change? Link to post Share on other sites
Nine 1,606 Posted August 5, 2020 Share Posted August 5, 2020 Have you put some error handling after each statement ? You will then find out why it is not working... “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector GIF Animation (cached) Screen Scraping Link to post Share on other sites
faustf 32 Posted August 5, 2020 Share Posted August 5, 2020 try with this code and tell about return Local $oBtns = $oIE.document.GetElementsByTagName("select") For $oBtn In $oBtns $id = String($oBtn.classid()) ;ConsoleWrite($classname & @CRLF) If $id = "Client_HasRelationshipWithExistingClient" Then _IEAction($oBtn, "click") ; _IEFormElementSetValue($oBtn, $sUser) EndIf Next Link to post Share on other sites
Danp2 1,357 Posted August 5, 2020 Share Posted August 5, 2020 Check the Scite console for errors. I suspect you are going to find that IEGetObjById is failing because "Client_RelationshipInformation" doesn't match "Client_HasRelationshipWithExistingClient" WebDriver UDF [GH&S] Latest version Wiki FAQs Link to post Share on other sites
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now