taiko icon indicating copy to clipboard operation
taiko copied to clipboard

Unable to specify options on actions with relative selectors

Open sswaroopgupta opened this issue 4 years ago • 1 comments

Describe the bug Unable to specify options on actions with relative selectors

To Reproduce Add a waitForEvents for a click with relativeSelectors example await click('something',above('somethingelse'),{options:{waitForEvents:['DOMContentLoaded']}}) Note The same is true for {force:true}. I cannot specify force on an action that takes relative parameters

Logs

Error: Invalid arguments passed, only relativeSelectors are accepted

Expected behavior I should be able to specify waitForEvents for a click with relative selectors

Screenshots

Versions:

  • Version: 1.2.5 (Chromium: 88.0.4314.0) RELEASE
  • Mac OS Mojave 10.14.6 (18G9028)
  • v12.13.0
Gauge version: 1.1.8
Commit Hash: b1501f4

Plugins
-------
html-report (4.0.12)
java (0.7.15)
js (2.3.16)
screenshot (0.0.1)

sswaroopgupta avatar Jun 11 '21 01:06 sswaroopgupta

If both relative selectors and options are gonna be used relative selector has to be passed as last argument.

await click('something', {waitForEvents:['DOMContentLoaded']}, above('somethingelse'))

or I would prefer

await click(text('something', above('somethingelse')), {waitForEvents:['DOMContentLoaded']})

NivedhaSenthil avatar Jun 26 '21 03:06 NivedhaSenthil