I've been working with RSelenium all day and still hitting road blocks here and there. My current issue is using the code WebElemReports$clickElement()
which clicks a link and a new window opens. I tried to adjust Firefox settings in "about:config" so that it will not open a new window. It doesn't open a window in normal use, but using RSelenium, it opens a new window still. I also looked at this approach but couldn't follow the logic of how it worked:
How to clickElement() and open the link in the same tab
My next thought process was to use the switchToWindow() function along with getWindowHandles(). The code I wrote is as follows:
remDr$closeWindow()
windHand <- remDr$getWindowHandles()
remDr$switchToWindow(windHand)
My thinking is that I will close the current window so that there will only be one handle to reference and pass that handle to the switchToWindow function. I can't find much switchToWindow documentation for R. I receive the following error with using the code above:
Error: Summary: UnknownError Detail: An unknown server-side error occurred while processing the command. class: org.openqa.selenium.WebDriverException
Any help on this would be much appreciated--I tried to research this as much as possible so this won't get marked as a duplicate question like my last post. Many Thanks.