Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 97762

Selenium drop down list selecting issue

$
0
0

I'm new to selenium and html. I'm facing an issue with selecting values from drop down list. I located the element but when I run the test I get error msg "unable to locate element"

<div class="custom-select" data-qa="school-grade-select" data-testid="school-grade-select" aria-disabled="false" xpath="1"><div class="custom-select__label">School Grade</div><div class="custom-select__dot">*</div><div class="Select is-searchable Select--single"><div class="Select-control"><div class="Select-multi-value-wrapper" id="react-select-10--value"><div class="Select-placeholder">Select</div><div class="Select-input" style="display: inline-block;"><input aria-activedescendant="react-select-10--value" aria-expanded="false" aria-haspopup="false" aria-owns="" role="combobox" value="" style="" required=""><div style="position: absolute; top: 0px; left: 0px; visibility: hidden; height: 0px; overflow: scroll; white-space: pre; font-size: 16px; font-family: &quot;Open Sans&quot;, sans-serif; font-weight: 400; font-style: normal; letter-spacing: normal; text-transform: none;"></div></div></div><span class="Select-arrow-zone"><span class="Select-arrow"></span></span></div></div></div>

When I the list exands the dom changes to

aria-activedescendant='react-select-10--option-0
aria-activedescendant='react-select-10--option-1

etc.

I have tried

"//div[@class='subjectModal__column']//div[2]//div[3]//div[1]//div[1]//div[2]/input[@aria-activedescendant='react-select-10--option-2']"

but didnt work

Any advise?


Viewing all articles
Browse latest Browse all 97762

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>