Closed Bug 852637 Opened 9 years ago Closed 9 years ago

Implement something like Build for action chains?

Categories

(Testing :: Marionette, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: mdas, Unassigned)

Details

Looking at https://code.google.com/p/selenium/wiki/AdvancedUserInteractions#Getting_started_(short_how-to)

Now that Bug 851523 is in the works, we should have a way to copy an action chain so the user doesn't have to rebuild it themselves each time they want to repeat an action.

We can provide something like Build in UserInteractions, that will return a new Actions object the user can call to get a replica of the original chain. 

Something like:
action = Actions(self.marionette)
action.press(element)
action_copy = action.build()

where action_copy is also an Actions object. Thoughts?
Flags: needinfo?(dburns)
why not just action.copy()?
I think using python's copy, as JGriffin suggests, is good enough. THe build() method is for Java which isnt as kind :)
Flags: needinfo?(dburns)
(In reply to David Burns :automatedtester from comment #2)
> I think using python's copy, as JGriffin suggests, is good enough. THe
> build() method is for Java which isnt as kind :)

Works for me!
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.