VerifyLinkText command does not executes in my code | Selenium Forum
M
Monal Posted on 16/10/2019

I am working on JUNIT AND HYBRID (KEYWORD+DATA) FRAMEWORK Module 22 VIDEO part 8

Note: So currently in https://www.flipkart.com/ when the app loads the Login in window shows up right away, and we do not need to click on the Login link ...

As per video 8 after creating the verifyLinktext function and executing it... see attached screen shot ... I should see PASS after verifyLinktext in Application.log file but currently I do not see any response at all

As mention above the application loads fine and the Login In window shows up fine but when verifying for the "Forgot?" text that does not work

also note I am using CSS Selector instead of XPath

So could the be the reason ?

Is that login box in some Frame ? I tried searching for frame but did not saw 

Can someone please take a look ? Why I don't see the response


M
Monal Replied on 16/10/2019

Attaching a screen shot

Responsive image

M
Monal Replied on 16/10/2019

Attaching screen shot for OR.properties

Responsive image

M
Monal Replied on 16/10/2019

Also noted since the app has changed the XPath are not working I tried to capture the new ones but did not worked can you please confirm ..

Moreover do I need to add Thread.sleep(1000L); somewhere to get the "Forgot?" text to verify in my verifyLinkText function ?


A
Ashish Thakur Replied on 16/10/2019

As I can see in line number 6, you forgot to add _selector to the forgot_pssw_link key.


M
Monal Replied on 16/10/2019

Thanks Instructor,

 So updated the selector for forgot_pssw_link=._21JmK0 > span:nth-child(1)

But still I was getting similar error later I found out that I screwed up in my C Suite.xlsx where the keyword was "verifyLinktext" instead it should have been "verifyLinkText" which was my actual function name, so once I fixed that everything worked fine as expected.

Here I just remembered you lecture advice voice to make sure you type correcly in the keyword text etc .... lol sorry I screwed up on that.... anyway once again Thank you 

Instructor

-Monal ... please close this query

Responsive image

M
Monal Replied on 16/10/2019

The program works now....s

Responsive image