腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(9999+)
视频
沙龙
1
回答
将xpath从字符串转换为
WebElement
java
、
selenium
、
selenium-webdriver
、
automation
、
pageobjects
因此,在下面的方法中,参数是(String xpathExpression),如何将其更改为
WebElement
,并使用将在其他页面中定义的其他元素
定位
器。protected boolean CheckSorting(String xpathExpression) { List<
WebElement
> issueTypeDropdown = new
浏览 0
提问于2018-06-21
得票数 0
回答已采纳
2
回答
无法
定位
webelement
selenium
、
internet-explorer
、
xpath
我尝试过的Xpath
定位
器: "//form[@id='Form1']//a[contains(text(),'Age Range')]" 和 "//form[@id='Form1']//a[@id='
浏览 16
提问于2019-02-09
得票数 0
3
回答
无法
定位
webelement
java
、
selenium
、
selenium-webdriver
、
xpath
、
selenium-chromedriver
我正在打开chrome浏览器,然后导航到一个网站的登录页面。我找不到用户名输入字段的Web元素。这是我的代码: driver.get("https://petstore.octoperf.com/actions/Account.action");driver.findElement(By.xpath("//input[@id='stripes-95358526']")).sendKeys("saif");
浏览 10
提问于2021-04-29
得票数 1
回答已采纳
1
回答
Java Selenium没有这样的元素:找不到元素
java
、
selenium-webdriver
我正在尝试
定位
一个linkText为“T恤”的网页元素。我首先
定位
了父类,然后尝试
定位
元素。我打印了其父对象的标记名,它按预期工作。但是我既
无法
使用linkText也
无法
使用partialLinkText
定位
该元素。该网页为。
WebElement
tshirts_tab = driver.findElement(By.cssSelector(".sf-menu.clearfix.menu-content.sf-js-enabled.sf-arrows"
浏览 1
提问于2018-10-18
得票数 2
2
回答
XPath在WebDriver页面对象模型中未被识别
selenium
、
webdriver
、
selenium2
、
xpath
、
page-objects
@FindBy(xpath = "//td[contains (text(),'xxx')]")错误:
无法
定位
元素这是我的程序的实际代码public
WebElement
password;@FindBy(xpath= "
浏览 0
提问于2014-03-20
得票数 0
回答已采纳
2
回答
Selenium FindBy是否在PageObject类中实例化
WebElement
实例?
selenium
、
pageobjects
Selenium FindBy注释实际上实例化
WebElement
实例吗?如果是的话,使用它们的框架的内涵是什么?public
WebElem
浏览 4
提问于2016-02-18
得票数 3
回答已采纳
1
回答
While循环和ExpectedConditions -可以一起使用吗?
java
、
selenium
、
selenium-webdriver
、
webdriver
通过下面列出的方法,Iam获得了
无法
定位
元素/超时异常的奇数。 try { System.out.printl
浏览 2
提问于2017-02-27
得票数 0
回答已采纳
1
回答
通过
定位
器从
WebElement
代理获取
java
、
selenium
、
appium
在Java语言中,有没有办法获取在失败的尝试中查找
WebElement
时使用的By
定位
器?什么 我要做的是,在捕捉到NoSuchElementException的时候,在再次尝试查找元素之前,通过
定位
器查看并更改它(从id改为xpath)。我使用的是页面工厂模式和@FindBy(id=xxx) --我知道在找到
WebElement
之前,它是我要使用的代理对象。在Eclipse的调试视图中,在找不到元素之后的断点处,我可以看到By locator信息,但在代码中我
无法
提取它。
浏览 3
提问于2017-04-24
得票数 0
1
回答
标记类型作为selenium中的字符串变量
css
、
selenium
假设我举了一个例子:举个例子,我尝试了下面的部分
webElement
.findElement( By.cssSelector( "'" +我得到错误,因为“
无法
定位
元素与
定位
器”。但如果我按下面的方式试一下,它就能正常工作了。
webElement
.getElement().findElement( By.cssSelector( "li[__idx='" + in
浏览 2
提问于2016-05-13
得票数 0
回答已采纳
2
回答
无法
使用href或text()找到元素
java
、
selenium-webdriver
rads.stackoverflow.com/amzn/click/com/B071NZZHF9" rel="nofollow noreferrer"> == $0
WebElement
element = dr.findElement(By.xpath("//a[text()='B071NZZHF9']"));
WebElement</em
浏览 1
提问于2017-11-07
得票数 0
回答已采纳
2
回答
无法
使用WebDriver在文本字段中输入文本
java
、
selenium-webdriver
、
sendkeys
我试图在两个文本字段中输入文本,我尝试了几乎所有的元素
定位
器,Javascript技巧,但文本就是不能输入到字段中。测试通过了,但我看到没有输入任何文本。这应该是可行的,但提供了一段代码:
WebElement
passwordField
浏览 2
提问于2016-08-12
得票数 1
回答已采纳
1
回答
无法
在我的应用程序中找到下拉输入字段的元素
javascript
、
java
、
selenium
、
dropdown
无法
为下拉输入字段
定位
元素,我正在尝试使用id (caction-3)和类名来
定位
该元素,其显示在行的标记内。List <
WebElement
> findtags = d.findElements(By.className("rejected_row")); for (
WebElement
search
浏览 11
提问于2020-02-18
得票数 0
1
回答
即使表中有等待,也
无法
定位
元素
java
、
selenium-webdriver
我正在尝试设置一个
WebElement
,这样我就可以用以下方式单击它:但是当我试图找到这个元素时,它总是抛出
无法
定位
的元素,我尝试过几种方法,但是它找不到它。ExpectedConditions.presenceOfAllElementsLocatedBy(By.xpath("//div[contains(text(),'Loading...
浏览 1
提问于2016-02-15
得票数 1
2
回答
方法不能正确地等待元素可见
java
、
selenium
、
selenium-webdriver
、
webdriver
this.wait.until(ExpectedConditions.visibilityOf(element)).isDisplayed();WaitUntilWebElementIsVisible(
WebElement
元素){
WebElement
{ Thread.sleep(2000);System.out.println("
WebElement
使用
定位
器可见:“+ element.toString());返回真;}catch (异常e) { System.out.println("
WebE
浏览 6
提问于2017-05-31
得票数 0
2
回答
无法
单击元素,尽管单击“不抛出错误”
java
、
selenium
、
svg
、
selenium-webdriver
即使click ()不是抛出错误,我也
无法
单击
webelement
。我也尝试过javascript,而不是等待问题,因为我添加了Thread.sleep()但后来我用我得到的这个
无法
定位
元素错误
浏览 4
提问于2016-11-16
得票数 0
回答已采纳
1
回答
如何从selenium中的动态div中获取最新记录
selenium
、
selenium-webdriver
、
automation
@FindBy(xpath =“//div@class=”md-requests parent“)公共
WebElement
divParent; Selectnew Select(driver.findElement(By.xpath("//div[@class=\\\"md-requests-list-parent\\\"]"))); List<
WebElement
浏览 1
提问于2022-06-01
得票数 0
1
回答
为什么它打印会话id而不是元素路径?
python
、
selenium
、
selenium-webdriver
、
webdriver
代码:print(FindComment)<selenium.webdriver.firefox.webdriver.WebDriver (session="99sf9sfjSIFSf-f9sf(JSFsfsfs")>
浏览 0
提问于2021-03-17
得票数 0
2
回答
从表中检索搜索结果
java
、
selenium
、
selenium-webdriver
、
webdriver
我
无法
找到表结果。
WebElement
names = driver.findElement(By.xpath("//*[@id='idnumber']/div[3]/table")); List<
WebElement
> TotalRowCount = names.findElements(By.xpath("//*[@id='idnumber']
浏览 1
提问于2015-08-19
得票数 0
回答已采纳
1
回答
Java如何单击基于AngularJS的页面中没有ID或ng类的按钮
selenium
、
selenium-webdriver
、
ui-automation
、
selenium-chromedriver
、
browser-automation
WebElement
clickNextButton = webDriver.findElement(By.cssSelector("button[ng-class='btn-success']"));clickNextButton.click(); webDriver.findElement(By.cssSelector("buttonng-class='pccCTRL.pow.Page1Inp
浏览 1
提问于2016-10-26
得票数 2
回答已采纳
1
回答
Webelement
分析
java
、
selenium
List<
WebElement
> listofprogramrequirements = row.findElements(By.className("course-selection-title"))
WebElement
tableelement = List<
WebElement
> trs = ta
浏览 2
提问于2020-01-23
得票数 0
回答已采纳
点击加载更多
热门
标签
更多标签
云服务器
ICP备案
对象存储
实时音视频
云点播
活动推荐
运营活动
广告
关闭
领券