I am new to automation, Selenium Web Driver and am practicing code using Amazon. I want to my logged in user name (Hello, Nichole) on the Amazon Home Page but anything I enter using or comes back in error. I am also using page factory-

    //@FindBy (how=How.CSS, using= "a:contains'Hello,Nichole')") WebElement loggedInUsernameText;

I am not going to add my xpath expression because I tried too many variations, to no avail.

I have attached a screenshot of the HTML code-Hello,Nichole HTML CODE

Any help would be appreciated- let me know if I need to supply more info-



Source link https://sqa.stackexchange.com/questions/34994/verify--using-css-or-xpath

LEAVE A REPLY

Please enter your comment!
Please enter your name here