I am new to automation, Selenium Web Driver and am practicing code using Amazon. I want to verify my logged in user name (Hello, Nichole) on the Amazon Home Page but anything I enter using CSS or Xpath 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-
Any help would be appreciated- let me know if I need to supply more info-