简体   繁体   English

Selenium Webdriver找不到具有javascript的元素

[英]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 . Selenium Webdriver无法找到具有下拉列表并受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 . 您首先需要单击span.select2-arrow Then the search filter appears and you should be able to send text to input.select2-input . 然后出现搜索过滤器,您应该能够将文本发送到input.select2-input

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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