I want to download a file from a website using RSelenium, with Firefox browser. I do everything correctly (navigate, select the correct element and write what I want); now I click the "download" button, then a firefox popup opens and ask me if I want to download the file or "open with..." something else.
Unfortunately I cannot write an example due to privacy constraints.
My question is: how can I switch to the popup window / alert and click "OK" when needed?
I tried the following methods with no success:
remDrv$acceptAlert() -> tells me: NoAlertOpenError
remDrv$executeScript("driver.switchTo().alert().accept()")
I also tried the method
remDrv$getWindowHandles()
but even if the popup is open, the command return me one window only (the beginning one, not the popup), therefore I'm not able to use the:
remDrv$switchToWindow()
to switch to the popup window.
Any ideas? Thanks