-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNode3.java
More file actions
36 lines (34 loc) · 1.24 KB
/
Copy pathNode3.java
File metadata and controls
36 lines (34 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package testing;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.Platform;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.testng.annotations.Test;
public class Node3 {
WebDriver driver;
String nodeUrl;
@Test
public void f() {
try {
//configuration
nodeUrl= "http://172.16.56.246:5555/wd/hub";
DesiredCapabilities capabilities = DesiredCapabilities.chrome();
capabilities.setBrowserName("chrome");
capabilities.setPlatform(Platform.LINUX);
driver = new RemoteWebDriver(new URL(nodeUrl), capabilities);
//test scripts
driver.manage().deleteAllCookies();
driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
driver.manage().timeouts().pageLoadTimeout(45, TimeUnit.SECONDS);
driver.get("https://www.google.com/");
}
catch (MalformedURLException e) {
e.printStackTrace();
}
}
}