Selenium Htmlunit org.openqa.selenium.ElementNotVisibleException:您只能与可见元素进行交互 [英] Selenium Htmlunit org.openqa.selenium.ElementNotVisibleException: You may only interact with visible elements

查看:102
本文介绍了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屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆