Advertisement
Guest User

Untitled

a guest
May 26th, 2016
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. File
  2. "/Library/Python/2.7/site-packages/selenium-2.15.0-py2.7.egg/selenium/webdriver/common/action_chains.py",
  3. line 44, in perform
  4. action() File "/Library/Python/2.7/site-packages/selenium-2.15.0-py2.7.egg/selenium/webdriver/common/action_chains.py",
  5. line 201, in <lambda>
  6. self._driver.execute(Command.MOVE_TO, {'element': to_element.id})) AttributeError: 'str' object has no attribute 'id'`
  7.  
  8. from selenium import webdriver
  9. from selenium.webdriver import ActionChains
  10. driver = webdriver.Firefox()
  11. ac = ActionChains()
  12. source = driver.get_element_by_xpath(<xpath>)
  13. target = driver.get_element_by_xpath(<xpath>)
  14. ac.drag_and_drop(source, target).perfrom()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement