任何人都可以帮我解决相同的异常,因为我在运行我的代码时五分之二会得到此异常
public selectTags(int tags){
WebDriver driver = DriverFactory.getWebDriver()
for(int i=1; i<=tags; i++){
WebElement elementCheckBox = driver.findElement(By.cssSelector('div.v-scrollable.v-table-body-wrapper.v-table-body div:nth-child(1) table tbody tr:nth-child('+i+') td:nth-child(1) input'))
if(!elementCheckBox.isSelected()){
elementCheckBox.click()
WebUI.delay(1)
}
}
}
答案 0 :(得分:0)
您为什么不共享HTML元素? 这可能有助于解决问题。
我想您应该在单击之前和单击之前使用延迟
html_theme = 'sphinx_rtd_theme'
html_static_path = ['_static']
html_logo = 'logo.svg'
html_theme_options = {
'logo_only': True,
'display_version': False,
}