RohanM Posted June 25, 2022 Posted June 25, 2022 I want to select option from the select element and I used _WD_SetElementValue but it not getting selected, can anyone please help me? Initiate_Browser() _WD_Navigate($Session, 'https://www.shipco.com/ecommerce/tra/tra_result.php') Local $Test = _WD_LoadWait($Session, 500) Local $oSearchType = _WD_GetElementById($Session, 'cSearchBy') _WD_SetElementValue($Session, $oSearchType,'Booking Number')
Solution Danp2 Posted June 25, 2022 Solution Posted June 25, 2022 Please try with _WD_ElementOptionSelect -- Local $sXpath = "//select[@class='form-control ng-pristine ng-invalid ng-touched']/option[text()='Booking Number']" _WD_ElementOptionSelect($Session, $_WD_LOCATOR_ByXPath, $sXpath) Latest Webdriver UDF Release Webdriver Wiki FAQs
RohanM Posted June 25, 2022 Author Posted June 25, 2022 @Danp2 thanks you for the quick response, it worked. thanks once a gain.
Developers Jos Posted June 27, 2022 Developers Posted June 27, 2022 Moved to the appropriate AutoIt General Help and Support forum, as the AutoIt Example Scripts forum very clearly states: Quote Share your cool AutoIt scripts, UDFs and applications with others. Do not post general support questions here, instead use the AutoIt Help and Support forums. Moderation Team SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
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