Please explain the logic of ExtentReports rep = ExtentManager.getinstance(); | Selenium Training|Java|WebDriver|TestNG|Frameworks|Videos
15% Learning Discount Avail now

Selenium Training Forum

please explain the logic of ExtentReports rep = ExtentManager.getinstance();

K
Kapil Kuriakose Post on 01/11/2019

ExtentReports rep = ExtentManager.getinstance();

 

what is happening in this line?

K
Kapil Kuriakose Reply 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?

S

Instructor

Support Team Reply 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 Reply 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?

S

Instructor

Support Team Reply on 08/11/2019

e can access

a,b,c