开发者

Xpath syntax showing an error

开发者 https://www.devze.com 2023-03-03 07:06 出处:网络
I\'m trying to test dynamic id\'s with PHPUnit so i choose to use xpath to check if the element contains the id specified, but when ever i run my test it gives开发者_如何学运维 me the error that Inval

I'm trying to test dynamic id's with PHPUnit so i choose to use xpath to check if the element contains the id specified, but when ever i run my test it gives开发者_如何学运维 me the error that Invalid xpath.

My xpath code is as follows

$this->click("xpath=//div[@contains(@id,'ROOT')]")

What can i be doing wrong guys?

Thanks Donald


Try removing the @ that's just before contains.

0

精彩评论

暂无评论...
验证码 换一张
取 消