Something similar happened to me, but I managed to generate the code using Katalon Recorder (Selenium IDE for Chrome)
. Once having the code lower the geckoDriver
and paste it in a folder in C:
Then in the class that generates Katalon Recorder
I did this:
@Before
public void setUp() throws Exception {
System.setProperty("webdriver.gecko.driver", "C:/geckoDriver/geckodriver.exe");
DesiredCapabilities capabilities = DesiredCapabilities.firefox();
capabilities.setCapability("marionette", true);
driver = new FirefoxDriver();
//driver = new ChromeDriver();
baseUrl = "https://www.google.com/";
Dimension initial_size = driver.manage().window().getSize();
height = initial_size.getHeight();
width = initial_size.getWidth();
System.out.println(height+ ","+width);
driver.manage().window().maximize();
initial_size = driver.manage().window().getSize();
height = initial_size.getHeight();
width = initial_size.getWidth();
System.out.println(height+ ","+width);
driver.manage().window().setSize(new Dimension(width, height-175));
//driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
}
The rest is to add the necessary jars, and use the rest of the code generated by Katalon Recorder
in the method
@Test
public void testMonitoreo() throws Exception {