A
A
AidanaEnver2018-08-27 14:48:16
selenium
AidanaEnver, 2018-08-27 14:48:16

I get the error no such element: Unable to locate element: {"method":"xpath","selector":"//table/tbody/tr[contains(.,'mylogin')]"}?

I write the path to the link inside the dynamic table via xpath:
element(by.xpath("//tbody/tr[contains(.,'mylogin')]/td[8]/div/a[@class='badge progress-bar -danger']/@href")).click;
I get the error: find activation button
- NoSuchElementError: no such element: Unable to locate element: {"method":"xpath","selector":"//table/tbody/tr[contains(.,'mylogin')]" }
what's wrong? please tell me when you look through xpather.com the path is right. Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Eremin, 2018-08-27
@EreminD

//table/tbody/tr[contains(.,'mylogin')] - what's the semicolon?
let's //table/tbody/tr[contains(text(), 'mylogin')] ?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question