Selenium Htmlunit org.openqa.selenium.ElementNotVisibleException:您只能与可见元素进行交互 [英] Selenium Htmlunit org.openqa.selenium.ElementNotVisibleException: You may only interact with visible elements
本文介绍了Selenium Htmlunit org.openqa.selenium.ElementNotVisibleException:您只能与可见元素进行交互的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
需要选择单选按钮的问题支持,尝试使用javascript 但不起作用.
Need support on issue selecting radio button, tried with javascript but not working.
WebElement Select4 = driver.findElement(By.name("IsGoldMember"));
Select4.click();
推荐答案
尝试driver.findElement(By.xpath("//input[@id='IsGoldMemberTrue']"));
. 名称IsGoldMember
在网页上可能不是唯一的情况.
Try driver.findElement(By.xpath("//input[@id='IsGoldMemberTrue']"));
. It maybe the case that the name IsGoldMember
is not unique on the web page.
这篇关于Selenium Htmlunit org.openqa.selenium.ElementNotVisibleException:您只能与可见元素进行交互的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文