Why do we pass the driver object in the constructor | Selenium Forum
M
Posted on 19/04/2016
My query is -
why do we pass driver instance when we we create constructor and also second bold line.

eg-

public Class Pages(){
public static Webdriver driver =null;

public Pages([b:3nq5i9kn]Webdriver dr[/b:3nq5i9kn]){
[b:3nq5i9kn]driver=dr[/b:3nq5i9kn];
}
}

M
Replied on 19/04/2016

watch the java videos.

its done to increase the scope of the Webdriver. to make it public.


M
Replied on 20/04/2016

Sir, If possible can you specify which tutorial.


M
Replied on 20/04/2016

watch the page object model.