Here is a snippet of my code:
public void deleteOffer(){
driver.findElement(By.xpath("html/body/main/div/div/div/div[2]/a[2]")).click();
driver.switchTo().alert().accept();
driver.findElement(By.xpath("html/body/div[1]/div")).click();
}
Im getting this error: 1494803297020 Marionette INFO New connections will no longer be accepted
It seems like it's stopping working right after driver.switchTo().alert().accept();
so I guess the reason is that I shoul switch back to main frame but I don't know how to do it. I have tried driver.switchTo().parentFrame();
and driver.switchTo().defaultContent();
but getting still the same error.
Here is the solution to your Question:
I don't see any error as such in your code, but I will suggest the following:
Alert
to Accept, slow down a bit, induce some wait
.driver.switchTo().alert().accept()
then you don't need to switch back to the main frame.driver.findElement(By.xpath("html/body/div[1]/div")).click();
,slow down a bit, induce some wait
again.New connections will no longer be accepted
is something serious Marionette
complaining about which essentially means you are trying a test step which can't be achieved by the geckodriver. Hence you may need to change your code for the geckodriver to proceed with the task.Let me know if this Answers your Question.