KieranS7 / gmailtutorial

0 stars 1 forks source link

Page Object malformed #1

Open stevewalton28 opened 5 years ago

stevewalton28 commented 5 years ago

So the line I ref in the link here needs to be part of the method createAccount.

https://github.com/KieranS7/gmailtutorial/blob/6d7e26901424bec2dcd4d25e22001b548b80840c/src/test/java/uk/co/bpdts/gmailtutorial/pageobjects/LandingPagePageObject.java#L14

Createaccount should be createAccount

createAccount should return itself. It needs to do this to follow the page object pattern. That means it should look like:

` public LandingPagePageObject createAccount() { driver.findElement(By.xpath("//a[@class='gmail-navnav-link gmail-navnav-link__create-account']");

}`

createAccount doesn't DO anything. It finds the element, but doesn't click or anything? What should it do?

KieranS7 commented 5 years ago

It should click the button and then the script should move on to the SignUpPageObject