Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23131

How to open content in a new tab using Python + Selenium

$
0
0

I am using Python + Selenium.

Browsing this page

https://rovo.co/explore/activities

you will see many activities.

Using Python + Selenium, how can I open each activity in a new tab, and switch to the new tab?

I tried the following code, but it doesn't open in a new tab.

link = WebDriverWait(driver, 30).until(EC.element_to_be_clickable(driver.find_elements(By.CLASS_NAME, "css-vurnku")[0]))actions = ActionChains(driver)actions.key_down(Keys.CONTROL)actions.click(on_element=link)actions.perform()

Any help is highly appreciated.


Viewing all articles
Browse latest Browse all 23131

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>