我正在尝试将此xpath放入eclipse中,但它不起作用。有什么想法吗?我不得不说,我把“”放在她的SistemS.A之间,因为那个名字也有“‘”,所以我必须使用“”来指定特定的文本,如果我把“HER'S SistemS.A.”放在一起,我的机器人就能识别这个文本。出现“‘”和错误之间,因为有三个“’”。所以我不确定如何在eclipse中修复这个问题。
在我的方法中有一个文本和另一个文本,我不能使用‘’this,因为我必须在我的xpath中使用它。
我的xpath方法如下:
标题SeleccionCuentaDeOportunidad =findBy(String.format(“(//*包含(@title,'Jonathan')//parent::span1/parent::th1//following-sibling::tdposition()=1//child::a1)@title="HER'S SistemS.A.”“));
提前谢谢。
发布于 2019-03-12 08:10:11
以下是解决方案。
WebElement SeleccionCuentaDeOportunidad =findBy(String.format("(//*[contains(@title,'Jonathan')]//parent::span[1]/parent::th[1]//following-sibling::td[position()=1]//child::a[1])[@title=\"HER'S SISTEM S.A.\"]"))
https://stackoverflow.com/questions/55111670
复制相似问题