actions.rst (707B)
1 Actions 2 ======= 3 4 .. py:currentmodule:: marionette_driver.marionette 5 6 Action Sequences 7 ---------------- 8 9 :class:`Actions` are designed as a way to simulate user input like a keyboard 10 or a pointer device as closely as possible. For multiple interactions an 11 action sequence can be used:: 12 13 element = marionette.find_element("id", "input") 14 element.click() 15 16 key_chain = self.marionette.actions.sequence("key", "keyboard1") 17 key_chain.send_keys("fooba").pause(100).key_down("r").perform() 18 19 This will simulate entering "fooba" into the input field, waiting for 100ms, 20 and pressing the key "r". The pause is optional in this case, but can be useful 21 for simulating delays typical to a users behaviour.