fix Diff: DemoQA
This commit is contained in:
@@ -2,6 +2,7 @@ package zacksolutions.SeleniumPractice;
|
|||||||
|
|
||||||
import java.net.MalformedURLException;
|
import java.net.MalformedURLException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
|
import java.time.Duration;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
import org.openqa.selenium.By;
|
import org.openqa.selenium.By;
|
||||||
@@ -28,18 +29,17 @@ public class ToolsTextTest {
|
|||||||
@Parameters("Browser")
|
@Parameters("Browser")
|
||||||
public void Setup(String browser) {
|
public void Setup(String browser) {
|
||||||
if (browser.equalsIgnoreCase("Chrome")) {
|
if (browser.equalsIgnoreCase("Chrome")) {
|
||||||
/*
|
|
||||||
ChromeOptions options = new ChromeOptions();
|
ChromeOptions options = new ChromeOptions();
|
||||||
try {
|
try {
|
||||||
driver = new RemoteWebDriver(new URL("http://192.168.1.215:4444/wd/hub"), options);
|
driver = new RemoteWebDriver(new URL("http://192.168.1.215:4444/wd/hub"), options);
|
||||||
} catch (MalformedURLException e) {
|
} catch (MalformedURLException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
*/
|
/*
|
||||||
System.getProperty("web-driver.chrome", "user.dir" + "/InterviewCodingQuestionsQA/Drivers/chromedriver");
|
System.getProperty("web-driver.chrome", "user.dir" + "/InterviewCodingQuestionsQA/Drivers/chromedriver");
|
||||||
driver = new ChromeDriver();
|
driver = new ChromeDriver();
|
||||||
|
*/
|
||||||
} if (browser.equalsIgnoreCase("FireFox")) {
|
} if (browser.equalsIgnoreCase("FireFox")) {
|
||||||
/*
|
|
||||||
FirefoxOptions options = new FirefoxOptions();
|
FirefoxOptions options = new FirefoxOptions();
|
||||||
try {
|
try {
|
||||||
driver = new RemoteWebDriver(new URL("http://192.168.1.215:4444/wd/hub"), options);
|
driver = new RemoteWebDriver(new URL("http://192.168.1.215:4444/wd/hub"), options);
|
||||||
@@ -47,11 +47,15 @@ public class ToolsTextTest {
|
|||||||
// TODO: handle exception
|
// TODO: handle exception
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
*/
|
/*
|
||||||
System.getProperty("web-driver.gecko", ("user.dir") + "InterviewCodingQuestionsQA/Drivers/geckodriver");
|
System.getProperty("web-driver.gecko", ("user.dir") + "InterviewCodingQuestionsQA/Drivers/geckodriver");
|
||||||
driver = new FirefoxDriver();
|
driver = new FirefoxDriver();
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
driver.get("https://demoqa.com/text-box");
|
driver.get("https://demoqa.com/text-box");
|
||||||
|
driver.manage().window().maximize();
|
||||||
|
driver.manage().deleteAllCookies();
|
||||||
|
driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(30));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
Reference in New Issue
Block a user