Ipopraw Posted April 28, 2020 Posted April 28, 2020 (edited) Hello everyone! I can enter a username and password, but I can not change the language in the form of login. I need to choose English language. Can you help me? I tried in different ways, but nothing works <form name="form" class="form-inline" id="form" data-name="Form"> <li> <div class="w-row"> <div class="w-col w-col-6"> <select name="LANG_CD" id="LANG_CD_jqxComboBox" role="combobox" aria-disabled="false" style="display: none;" aria-autocomplete="both" data-name="LANG_CD"> <option selected="selected" value="de-DE">German</option> <option value="en-US">English</option> <option value="fr-FR">French</option> </select> <div title="" class="text-field jqx-combobox-state-normal jqx-combobox jqx-rc-all jqx-widget jqx-widget-content" id="LANG_CD" aria-haspopup="true" aria-readonly="false" aria-activedescendant="listitem0innerListBoxjqxWidget2cad406e" aria-owns="listBoxjqxWidget2cad406e" style="width: 146px; height: 24px; color: rgb(119, 123, 140);" aria-multiline="false"><div style="margin: 0px; padding: 0px; border: 0px currentColor; border-image: none; width: 100%; height: 100%; position: relative; background-color: transparent; -webkit-appearance: none;"><div id="dropdownlistWrapperLANG_CD" style="margin: 0px; padding: 0px; border: currentColor; border-image: none; width: 100%; height: 100%; float: left; position: relative; background-color: transparent;"><div class="jqx-combobox-content jqx-widget-content" id="dropdownlistContentLANG_CD" style="margin: 0px; padding: 0px; left: 0px; top: 0px; width: 122px; height: 24px; border-top-color: currentColor; border-bottom-color: currentColor; border-top-width: medium; border-bottom-width: medium; border-top-style: none; border-bottom-style: none; float: left; position: absolute;"> <input class="jqx-combobox-input jqx-widget-content jqx-rc-all" style="margin: 0px; padding: 0px 3px; border: 0px currentColor; border-image: none; width: 100%; height: 24px;" type="text" readonly="readonly" placeholder="" value="German" autocomplete="off"></div><div class="jqx-combobox-arrow-normal jqx-fill-state-normal jqx-rc-r" id="dropdownlistArrowLANG_CD" role="button" style="border-width: 0px 0px 0px 1px; margin: 0px; padding: 0px; left: 123px; width: 24px; height: 24px; float: right; position: absolute;"><div class="jqx-icon-arrow-down jqx-icon"></div></div></div></div> <input type="hidden" readonly="readonly" value="de-DE"></div> </div> </div> </li> </ul> </form> Edited May 3, 2020 by Ipopraw
FrancescoDiMuro Posted April 28, 2020 Posted April 28, 2020 5 minutes ago, Ipopraw said: I tried in different ways, but nothing works Show us Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette
Ipopraw Posted April 28, 2020 Author Posted April 28, 2020 (edited) 46 minutes ago, FrancescoDiMuro said: Show us $oLANG_CD = _IEGetObjById($oIE, "LANG_CD_jqxComboBox") _IEFormElementOptionSelect($oLANG_CD, "en-US", 1, "byValue") _IEFormElementOptionSelect($oLANG_CD, "English", 1, "byText") _IEPropertySet($oLANG_CD, "outertext", "English") ------------------------------------------------------------ $oLANG_CD = _IEGetObjByName($oIE, "LANG_CD") _IEFormElementOptionSelect($oLANG_CD, "en-US", 1, "byValue") _IEFormElementOptionSelect($oLANG_CD, "English", 1, "byText") _IEFormElementOptionSelect($oLANG_CD, 1, 1, "byIndex") ------------------------------------------------------------ Local $oForm = _IEFormGetObjByName($oIE, "Form") Local $oLANG_CD = _IEFormElementGetObjByName($oForm, "LANG_CD") _IEFormElementOptionSelect($oLANG_CD, "en-US", 1, "byValue") _IEFormElementOptionSelect($oLANG_CD, "English", 1, "byText") _IEFormElementOptionSelect($oLANG_CD, 1, 1, "byIndex") ------------------------------------------------------------ Local $oOptions = _IETagNameGetCollection($oSelect, 'select') For $oOption In $oOptions MsgBox(0, "", "Option: " & $oOption.value & @CRLF) MsgBox(0, "", "Option: " & $oOption.innertext & @CRLF) $oOption = $oLANG_CD Next Trying on another sites. Example: $oIE = _IECreate("http://rst.ua") $sDroplist1 = _IEGetObjById($oIE, "rst-oldcars-form-make") _IEFormElementOptionSelect($sDroplist1, 40, 1, "byValue") $sDroplist2 = _IEGetObjById($oIE, "rst-oldcars-form-year") _IEFormElementOptionSelect($sDroplist2, "2015", 1, "byText") $sDroplist3 = "" $tags = $oIE.document.GetElementsByTagName("Select") For $tag in $tags $class_value = $tag.GetAttribute("tabindex") if string($class_value) = "5" Then $sDroplist3 = $tag EndIf Next _IEFormElementOptionSelect($sDroplist3, "2020", 1, "byText") but I can not change the language in form of the topic Edited April 28, 2020 by Ipopraw Add the samples
Danp2 Posted April 28, 2020 Posted April 28, 2020 3 hours ago, Ipopraw said: <select name="LANG_CD" id="LANG_CD_jqxComboBox" I did some "sleuthing" based on this limited information and came to the conclusion that the site uses jQuery (specifically jQWidgets). If this is correct, then you could benefit from @Chimp's _jQuerify routine. Your code would look something like this -- Local $jQuery = _jQuerify($oIE) $jQuery('#LANG_CD_jqxComboBox').jqxComboBox('selectItem','English'); Ipopraw and Gianni 2 Latest Webdriver UDF Release Webdriver Wiki FAQs
Ipopraw Posted April 29, 2020 Author Posted April 29, 2020 On 4/28/2020 at 1:44 PM, Danp2 said: I did some "sleuthing" based on this limited information and came to the conclusion that the site uses jQuery (specifically jQWidgets). If this is correct, then you could benefit from @Chimp's _jQuerify routine. Your code would look something like this -- Local $jQuery = _jQuerify($oIE) $jQuery('#LANG_CD_jqxComboBox').jqxComboBox('selectItem','English'); Thanks for the help and example. Now I know in which direction to go.
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