se-interpreter icon indicating copy to clipboard operation
se-interpreter copied to clipboard

Per-step wait support

Open heydenberk opened this issue 10 years ago • 1 comments

While testing a rich web app with lots of DOM updates that don't trigger new page loads, I find myself doing a lot of this in my "steps":

{
  "type": "waitForElementPresent",
  "locator": {
    "type": "id",
    "value": "someId"
  }
},
{
  "type": "clickElement",
  "locator": {
    "type": "id",
    "value": "someId"
  }
},
{
  "type": "waitForElementPresent",
  "locator": {
    "type": "id",
    "value": "anotherId"
  }
},
{
  "type": "clickElement",
  "locator": {
    "type": "id",
    "value": "anotherId"
  }
}

I'd like to be able to specify a "globalWait" on the top level of the JSON, or a "wait" parameter per step. On my fork, I hacked together a version of the interperter that works this way, but I'm not comfortable issuing a PR unless there is some interest in implementing this feature. I'm not sure how it would interoperate with existing "waitFor" step types

Thanks and let me know what you think!

heydenberk avatar Nov 14 '14 21:11 heydenberk

You shouldn't have to do the waits before the click! Webdriver, which se-interpreter is built on, uses implicit waits, so the playback should wait for the appearance for the element anyway. Will double-check this works in the generic case.

Zarkonnen avatar Nov 26 '14 10:11 Zarkonnen