简体   繁体   中英

Selenium Webdriver cannot find the element that has javascript

Please help with my problem. Selenium Webdriver cannot locate this element that has dropdown and being controlled by javascript .

在此处输入图片说明

This is what should happen, clicking the dropdown should show an input text and will autosearch for what you have searched

在此处输入图片说明

It seems to me the element is dynamically generated when the button is clicked.

You will first need to click on span.select2-arrow . Then the search filter appears and you should be able to send text to input.select2-input .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM