Want to open a browser from concordion.
Trying to open browser from System.java class. But observed that WebDriver driver = new FirefoxDriver();
is not executed.
Here is structure of my project ;-
System.java class :-
package com.tutorialspoint;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class System {
public String initization(String browserName){
String url = null;
if (browserName=="firefox")
{
WebDriver driver = new FirefoxDriver();
driver.get("http://www.google.com");
url = driver.getCurrentUrl();
}
return url;
}
}
This is my BrowserFixture.java class :-
package specs.tutorialspoint;
@RunWith(ConcordionRunner.class)
public class BrowserFixture {
System system = new System();
public String initization(String browserName){
return system.initization(browserName);
}
}
Here is my .html input :-
<html xmlns:concordion="http://www.concordion.org/2007/concordion">
<head>
<link href="../concordion.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h1>Browser Initilization</h1>
<div class="example">
<h3>Example</h3>
<table>
<tr>
<th>browserName</th>
<th>initization</th>
</tr>
<tr concordion:execute="#result = initization(#browserName)">
<td concordion:set="#browserName">firefox</td>
</tr>
</table>
</div>
</body>
</html>