Please explain the logic of ExtentReports rep = ExtentManager.getinstance(); | Selenium Forum
K
Kapil Kuriakose Posted on 01/11/2019

ExtentReports rep = ExtentManager.getinstance();

 

what is happening in this line?


K
Kapil Kuriakose Replied on 01/11/2019

public static ExtentReports getInstance() {

 

this is the confuding line. 

 

usually we write

public static object[] sun(){

 

how a class can be a return type?


A
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 .

 

 

 

 

 

 

 


K
Kapil Kuriakose Replied on 07/11/2019

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?


A
Ashish Thakur Replied on 08/11/2019

e can access

a,b,c