Module 18: TestUtil logic related to displayname | Selenium Forum
M
Posted on 17/10/2016
Hi,
I am trying for gumtree site for implementing Junit DD. As per your videos login username is same as displayname.
But for us its loginname is =emailid and display name is =name so the condition at TestUtil will always fails

How to implement this one

i am just adding the if condition of TestUtil.java file

try{
String displaynameontop = driver.findElement(By.xpath(OR.getProperty("top_name_display"))).getText();
System.out.println(displaynameontop);


if(displaynameontop.equals("Welcome manjula"))
{
isLoggedIn = true;
}
else {
isLoggedIn = false;
}
}
catch(Throwable t)
{
isLoggedIn = false;


please find the screenshot of the application. let me know how we can implement.

M
Replied on 18/10/2016

where is it failing post the exception.