【发布时间】:2018-02-07 09:44:28
【问题描述】:
[头文件[][1]1seelnium webdriver 错误 线程“主”java.lang.NoClassDefFoundError 中的异常:org/openqa/selenium/support/ui/Select(错误名称:org/openqa/selenium/support/ui/select)
尝试过的代码:-
Select select = new Select(driver.findElement(By.cssSelector("body > app-root > app-patient-index > app-patient-profile > div.s_detail_doc_wrapper > div.s_patient_detail_tab > div > tabset > div > tab.active.tab-pane > form > div > div.s_patient_profile_form > div > div.col-md-9 > ul > li:nth-child(2) > div > div.col-md-9 > div > div.col-sm-5.pl0 > select")));
select.deselectAll();
select.selectByVisibleText("Married");
enter image description here 在此处输入图片说明
【问题讨论】:
-
选择 select = new Select(driver.findElement(By.cssSelector("body > app-root > app-patient-index > app-patient-profile > div.s_detail_doc_wrapper > div.s_patient_detail_tab > div > tabset > div > tab.active.tab-pane > form > div > div.s_patient_profile_form > div > div.col-md-9 > ul > li:nth-child(2) > div > div.col-md- 9 > div > div.col-sm-5.pl0 > 选择"))); select.deselectAll(); select.selectByVisibleText("已婚");]
-
您使用的是哪个版本的 Selenium?
-
你在哪一行得到错误?
-
使用版本 3
标签: selenium testing selenium-webdriver