Unable to resuse openbrowser in BDD Framework | Selenium Forum
M
Posted on 01/12/2016
Sir,

public void LaunchBrowser(String Browser)
{
if(Browser.equals("Mozilla") && mozilla==null){
w= new FirefoxDriver();
mozilla=w;
}else if(Browser.equals("Mozilla") && mozilla!=null){
w=mozilla;
}
}

NOTE:w here instance of webdriver as well as mozilla


[b:31wlo9k1]Issue i face:Am unable to use open browser for my Examples-2...[/b:31wlo9k1] of BDD framework.

Say Examples:
|Browser|data1|data2|Result|
|Mozilla|chaitra|pwdd1|Fail|
|Mozilla|chaitra1|pwdd2|Fail|



For data dataset 1 :New Mozilla browser is opened.
Now i expected by using above code as explained in "Training Video - 25" video4 dataset2 to be executed in opened browser.
But dataset2 is being executed in browserinstance2.[New browser window]

[b:31wlo9k1]Sir, Pls suggest, how to make data set2 execute in already opened browser.[/b:31wlo9k1]

M
Replied on 02/12/2016

Are you making mozilla static?


M
Replied on 02/12/2016

Your right sir..thankz for pointing out.......