Skip to content

Instantly share code, notes, and snippets.

@bormando
Created March 3, 2021 13:32
Show Gist options
  • Save bormando/aeb6f8b42cafa5b69c839b64cfa724ba to your computer and use it in GitHub Desktop.
Save bormando/aeb6f8b42cafa5b69c839b64cfa724ba to your computer and use it in GitHub Desktop.
Selenium Tools usage example (Python package)
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.common.by import By
from seletools.actions import drag_and_drop
browser = webdriver.Chrome(ChromeDriverManager().install())
browser.implicitly_wait(10)
browser.get("http://the-internet.herokuapp.com/drag_and_drop")
source = browser.find_element(By.CSS_SELECTOR, "#column-a")
target = browser.find_element(By.CSS_SELECTOR, "#column-b")
drag_and_drop(browser, source, target)
browser.quit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment