@Before
public void loginToGaa(Scenario scenario) {
almLogin();
if (!TagInfo.runThroughApi(scenario) && !isLoginCompleted()) {
Runtime.getRuntime().addShutdownHook(new Thread() {
public void run() {
LOGGER.debug("LOGGING OUT.");
new WindowsExecutionUtility().killChromeAndChromeDriver();
}
});
new WindowsExecutionUtility().killChromeAndChromeDriver();
LOGGER.debug("LOGGING IN");
gAAKeywords.OPEN_GAA("autURL");
gAAKeywords.LOGIN_TO_GAA("UserName", "Password");
PrepareReport.addReportPass(MessageConstants.LOGIN_TO_GAA);
setLoginCompleted(true);
}
}
@After public void wrapTest(Scenario scenario) {
try { Driver.webdriver.quit(); } catch (Exception | Error e) { LOGGER.error("wrapTest : "+e.getLocalizedMessage()); }
}
public class Driver {
public static WebDriver webdriver;
public synchronized static WebDriver getCurrentDriver() {
if (webdriver == null) {
webdriver = WebdriverFactory.createWebdriver();
webdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
webdriver.manage().timeouts().pageLoadTimeout(100, TimeUnit.SECONDS);
}
return webdriver;
}
public class Expedia_Action extends Config {
static WebDriver driver = Driver.getCurrentDriver();
static WebDriverWait wait = new WebDriverWait(driver, 10);
public static void searchForFlight(String flightOrigin, String flightDestination) throws InterruptedException {
driver.get(expedia_baseUrl);
webdriver = WebdriverFactory.createWebdriver();
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to a topic in the Google Groups "Cukes" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cukes/FeZ9EZSqfTk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cukes+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and all its topics, send an email to cukes+un...@googlegroups.com.