【发布时间】:2019-06-12 09:02:01
【问题描述】:
在下面提到的案例中发现Webelement问题
在网页https://pastebin.com/ 上,需要从下拉菜单“粘贴到期:”中选择“10 分钟”选项
以下是采取的步骤:
//Identification the Never option and clicking it the dropdown to show up
//This part of the code works
WebElement pasteExpiration = driver.findElement(By.xpath("//*[@class='form_frame_left']//*[@title = 'Never']"));
pasteExpiration.click();
//Selecting the'10 Minute' option, this code is not identified by the WebDriver
WebElement pasteExpiration10Minutes = driver.findElement(By.cssSelector("#select2-paste_expire_date-q4-container"));
WebDriver 没有看到“10 分钟”选项字段,我们尝试编写自己的 xpath,但没有任何效果。
【问题讨论】:
标签: java selenium google-chrome selenium-webdriver