Guest User

Untitled

a guest
Mar 20th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. from selenium import webdriver
  2. from selenium.webdriver.common.action_chains import ActionChains
  3.  
  4. def enter_hours(self, cell, amount):
  5. #Double-click
  6. actions = ActionChains(self.driver)
  7. actions.move_to_element(cell)
  8. actions.double_click(cell)
  9. actions.perform()
  10.  
  11. #Click
  12. cell.click()
  13.  
  14. #Now, when floating input is visible, grab it and use it!
  15. control = self.driver.find_element_by_css_selector('.grid-editbox')
  16. control.send_keys(amount)
Add Comment
Please, Sign In to add comment