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 {
|
pipeline {
|
||||||
agent any
|
agent {
|
||||||
|
label "agent_locke"
|
||||||
|
}
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
stage('Build') {
|
stage('Build') {
|
||||||
|
|||||||
@ -11,6 +11,7 @@ import org.openqa.selenium.WebDriver;
|
|||||||
import org.openqa.selenium.chrome.ChromeDriver;
|
import org.openqa.selenium.chrome.ChromeDriver;
|
||||||
import org.openqa.selenium.chrome.ChromeOptions;
|
import org.openqa.selenium.chrome.ChromeOptions;
|
||||||
import org.openqa.selenium.firefox.FirefoxDriver;
|
import org.openqa.selenium.firefox.FirefoxDriver;
|
||||||
|
import org.openqa.selenium.firefox.FirefoxOptions;
|
||||||
|
|
||||||
public class Initialization {
|
public class Initialization {
|
||||||
// let's set up our variables
|
// let's set up our variables
|
||||||
@ -48,13 +49,16 @@ public class Initialization {
|
|||||||
extent.setSystemInfo("Tester ID: ", "Sami");
|
extent.setSystemInfo("Tester ID: ", "Sami");
|
||||||
|
|
||||||
// conditioning our WebDriver with an if statement
|
// conditioning our WebDriver with an if statement
|
||||||
String browsername = prop.getProperty("browserC");
|
String browsername = prop.getProperty("browserF");
|
||||||
|
|
||||||
// launching FireFox
|
// launching FireFox
|
||||||
if (browsername.equalsIgnoreCase("firefox")) {
|
if (browsername.equalsIgnoreCase("firefox")) {
|
||||||
// System.setProperty("web-driver.gecko.driver","user.dir" +
|
// System.setProperty("web-driver.gecko.driver","user.dir" +
|
||||||
// "/drivers/geckodriver");
|
// "/drivers/geckodriver");
|
||||||
// driver = new FirefoxDriver();
|
// driver = new FirefoxDriver();
|
||||||
|
FirefoxOptions options = new FirefoxOptions();
|
||||||
|
options.addArguments("--headless");
|
||||||
|
driver = new FirefoxDriver(options);
|
||||||
driver.get(prop.getProperty("url"));
|
driver.get(prop.getProperty("url"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -63,9 +67,9 @@ public class Initialization {
|
|||||||
// System.setProperty("web-driver.gecko.driver", "user.dir" +
|
// System.setProperty("web-driver.gecko.driver", "user.dir" +
|
||||||
// "/drivers/chromedriver");
|
// "/drivers/chromedriver");
|
||||||
// driver = new ChromeDriver();
|
// driver = new ChromeDriver();
|
||||||
ChromeOptions options = new ChromeOptions();
|
// ChromeOptions options = new ChromeOptions();
|
||||||
options.addArguments("--headless");
|
// options.addArguments("--headless");
|
||||||
driver = new ChromeDriver(options);
|
// driver = new ChromeDriver(options);
|
||||||
driver.get(prop.getProperty("url"));
|
driver.get(prop.getProperty("url"));
|
||||||
}
|
}
|
||||||
driver.manage().window().maximize();
|
driver.manage().window().maximize();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user