ExtentReports rep = ExtentManager.getinstance();
what is happening in this line?
public static ExtentReports getInstance() {
this is the confuding line.
usually we write
public static object[] sun(){
how a class can be a return type?
Instructor
Ashish Thakur Replied on 06/11/2019
This class is supposed to return you ExtentReports Object reference
A function can also return object reference
For example when we write
WebElement e = driver.findElement(By...);
Here Find Element function returns reference of WebElement .
in this case, if webEliment class has methods a(), b(), and c(). and findElement() has methods x(), y() and z(). by writing WebElement e = driver.findElement(By...); which all methods can be called using the reference e?
Instructor
Ashish Thakur Replied on 08/11/2019
e can access
a,b,c