Clear existing actions/parameters after perform is invoked by mykola-mokhnach · Pull Request #663 · appium/java-client

Change list

Clear existing actions/parameters after perform method of the corresponding actions chain is invoked

Types of changes

  • No changes in production code.
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Details

I find the current behaviour confusing, since it may cause issues like this one: appium/appium#8734

The second possible solution might be to make a chain immutable after perform is called, so it will reject all the further parameter/action adding operations after perform method has been invoked once on a chain instance.