fix: 12 - testing firefox
Some checks failed
jenkins/ZenProject/pipeline/head There was a failure building this commit
Some checks failed
jenkins/ZenProject/pipeline/head There was a failure building this commit
This commit is contained in:
parent
9e4277a032
commit
0ad5c13d36
4
Jenkinsfile
vendored
4
Jenkinsfile
vendored
@ -1,5 +1,7 @@
|
||||
pipeline {
|
||||
agent any
|
||||
agent {
|
||||
label "agent_locke"
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Build') {
|
||||
|
||||
@ -11,6 +11,7 @@ import org.openqa.selenium.WebDriver;
|
||||
import org.openqa.selenium.chrome.ChromeDriver;
|
||||
import org.openqa.selenium.chrome.ChromeOptions;
|
||||
import org.openqa.selenium.firefox.FirefoxDriver;
|
||||
import org.openqa.selenium.firefox.FirefoxOptions;
|
||||
|
||||
public class Initialization {
|
||||
// let's set up our variables
|
||||
@ -48,13 +49,16 @@ public class Initialization {
|
||||
extent.setSystemInfo("Tester ID: ", "Sami");
|
||||
|
||||
// conditioning our WebDriver with an if statement
|
||||
String browsername = prop.getProperty("browserC");
|
||||
String browsername = prop.getProperty("browserF");
|
||||
|
||||
// launching FireFox
|
||||
if (browsername.equalsIgnoreCase("firefox")) {
|
||||
// System.setProperty("web-driver.gecko.driver","user.dir" +
|
||||
// "/drivers/geckodriver");
|
||||
// driver = new FirefoxDriver();
|
||||
FirefoxOptions options = new FirefoxOptions();
|
||||
options.addArguments("--headless");
|
||||
driver = new FirefoxDriver(options);
|
||||
driver.get(prop.getProperty("url"));
|
||||
}
|
||||
|
||||
@ -63,9 +67,9 @@ public class Initialization {
|
||||
// System.setProperty("web-driver.gecko.driver", "user.dir" +
|
||||
// "/drivers/chromedriver");
|
||||
// driver = new ChromeDriver();
|
||||
ChromeOptions options = new ChromeOptions();
|
||||
options.addArguments("--headless");
|
||||
driver = new ChromeDriver(options);
|
||||
// ChromeOptions options = new ChromeOptions();
|
||||
// options.addArguments("--headless");
|
||||
// driver = new ChromeDriver(options);
|
||||
driver.get(prop.getProperty("url"));
|
||||
}
|
||||
driver.manage().window().maximize();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user