Unable to click on label in robot framework

339 views
Skip to first unread message

Swapnali Botre

unread,
Jun 20, 2018, 2:38:33 AM6/20/18
to robotframework-users
hello 

I am stuck at clicking on label.
My label is Applicant but when I am trying to click on that label using 
Click  clickApplicant
    Click Element    xpath: //*[contains(text(), "Applicant")]

It will not work

But when I change that label with Applicant1 it will work

Click  clickApplicant
    Click Element    xpath: //*[contains(text(), "Applicant1")]

But in my application I required Applicant Name
What should I do..


Tatu Aalto

unread,
Jun 21, 2018, 2:16:57 AM6/21/18
to swap...@kumowiz.com, robotframework-users
Ugh

The xpath searches text as it's in DOM. There are some scenarios where the text case is different in DOM and in the UI, but this is a first time when I would have heard that also the text is different in the DOM and in the UI. Which doesn't mean that it's not possible.

To verify the above assumption, you could open the DOM, from the browser developer tools and look how the text looks like in DOM. Also with the developer tools it's possible to try out, which element the xpath points to[1]


--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at https://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages