webdriverio / recorder-extension

WebdriverIO Extension for Devtools that allows you to export tests directly from the Recorder panel.
https://webdriver.io
MIT License
10 stars 4 forks source link

`waitForElement` step transform incorrectly #5

Closed jecfish closed 2 years ago

jecfish commented 2 years ago

Steps:

  1. Import this JSON file in Recorder. https://github.com/puppeteer/replay/issues/268
  2. Export it as WebDriverIO script.
  3. Observe the step below is transform to

    // json
    {
      "type": "waitForElement", 
      "selectors": ["div.pay-container li"], 
      "operator": "==", 
      "count": 2
     }
    
     // wdio
     await expect(browser.$("div.pay-container li")).toBeElementsArrayOfSize(2)
  4. Run it with chrome driver. Test is failed. [NOT OK]
  5. Modify the script to browser.$$. Script rerun successfully.

Expect the step transform correctly to $$.

christian-bromann commented 2 years ago

fixed and published as v0.3.3