featurist / browser-monkey

Reliable DOM testing
https://browsermonkey.org
53 stars 6 forks source link

browser.shouldFind(selector, findOptions, existOptions) #58

Closed joshski closed 7 years ago

joshski commented 7 years ago

I prefer this slightly more "tell don't ask" style, i.e.

browser.shouldFind('.selector')

...is equivalent to:

browser.find('.selector').shouldExist()

Plus it's a bit shorter. WDYT?

dereke commented 7 years ago

yeah that examples reads better. how could we use this kind of syntax to make semantic finders better?

browser.button('Continue').shouldExist()

@refractalize any thoughts?

Jetski5822 commented 7 years ago

browser.Has?

Sent from my iPhone

On 7 Feb 2017, at 08:42, Derek Ekins notifications@github.com wrote:

yeah that examples reads better. how could we use this kind of syntax to make semantic finders better?

browser.button('Continue').shouldExist()

@refractalize any thoughts?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

joshski commented 7 years ago

browser.shouldFindButton('Continue')

refractalize commented 7 years ago

looks good, LGTM