import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
public class ChromeLoader {
public static void main(String[] args) throws InterruptedException {
System.setProperty("webdriver.gecko.driver", "/home/priyan/software/geckodriver-v0.26.0-linux64/geckodriver");
ChromeOptions options = new ChromeOptions();
options.setExperimentalOption("excludeSwitches", new String[] { "enable-automation" });
WebDriver driver = new ChromeDriver(options);
driver.navigate().to("http://raboninco.com/147sk");
Thread.sleep(10000);
driver.findElement(By.id("skip_bu2tton")).click();;
Thread.sleep(10000);
driver.quit();
}
}
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
public class ChromeLoader {
public static void main(String[] args) throws InterruptedException {
System.setProperty("webdriver.gecko.driver", "/home/priyan/software/geckodriver-v0.26.0-linux64/geckodriver");
ChromeOptions options = new ChromeOptions();
options.setExperimentalOption("excludeSwitches", new String[] { "enable-automation" });
WebDriver driver = new ChromeDriver(options);
driver.navigate().to("http://raboninco.com/147sk");
Thread.sleep(10000);
driver.findElement(By.id("skip_bu2tton")).click();;
Thread.sleep(10000);
driver.quit();
}
}
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>J4TL</groupId>
<artifactId>J4TL</artifactId>
<version>0.0.1-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-chrome-driver</artifactId>
<version>${selenium.version}</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>${selenium.version}</version>
</dependency>
</dependencies>
<properties>
<selenium.version>3.141.59</selenium.version>
</properties>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
</project>