Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from selenium import webdriver
- from selenium.webdriver.common.action_chains import ActionChains
- def enter_hours(self, cell, amount):
- #Double-click
- actions = ActionChains(self.driver)
- actions.move_to_element(cell)
- actions.double_click(cell)
- actions.perform()
- #Click
- cell.click()
- #Now, when floating input is visible, grab it and use it!
- control = self.driver.find_element_by_css_selector('.grid-editbox')
- control.send_keys(amount)
Add Comment
Please, Sign In to add comment