scrapy-splash
scrapy-splash copied to clipboard
Handling multiple window or pop-ups
In Selenium, we can do it by using window_handles and switch_to_window method.
Before clicking the link first store the window handle as
window_before = driver.window_handles[0]
after clicking the link store the window handle of a newly opened window as
window_after = driver.window_handles[1]
then execute the switch to window method to move to newly opened window
driver.switch_to_window(window_after)
Is there any way to do it with Splash/Scrapy?
No, multiple windows and non-js poopups are not supported by Splash at the moment.
Thank you for the response.
Since you've emphasized that it doesn't work with "non-js popups".
Could you please tell me how I can handle JS popups? Just need some clues.
I just meant that some popups are implemented as <div>
elements over the webpage, as opposed to opening a new browser window, and you can work fine with these popups.