量角器:跨径元素的xpath

时间:2018-07-06 07:28:14

标签: html angularjs xpath jasmine protractor

我试图单击一个span元素,但最后以

结尾

错误:

[12:48:44] E/launcher - Process exited with error code 1

跨度元素

<li class="ng-scope" style="">
<span>
<a href="javascript:Navigation.loadNewBulk()" class="active">
<i class="ui-tabs"></i> Configuration
</a>
</span>
</li>

我曾尝试在元素定位器下面标识span元素。

element(by.xpath("//span[.=' Configuration']")).click();
element(by.xpath("//span[text()=' Configuration']")).click();
element(by.xpath("//span[text()*=' Configuration']")).click();
element(by.xpath("//a[contains(text()=' Configuration')]")).click();

值得注意的是

element(by.xpath("//span[.=' Configuration']")).click();

直到昨天都工作正常,但是自从今天早上我更新了webdriver-manager以来就停止工作了。

webdriver-manager状态:

[12:45:25] I/status - selenium standalone version available: 3.13.0 [last]
[12:45:25] I/status - chromedriver version available: 2.40 [last]
[12:45:25] I/status - geckodriver version available: v0.21.0 [last]
[12:45:25] I/status - IEDriverServer is not present
[12:45:25] I/status - android-sdk is not present
[12:45:25] I/status - appium is not present

请帮助我解决这个问题。

0 个答案:

没有答案