Skip to content
This repository was archived by the owner on Jun 27, 2019. It is now read-only.

Selenium IDE: generate 'check is get' instead of 'ensure do verify with' #101

Open
raboof opened this issue Nov 28, 2013 · 4 comments
Open

Comments

@raboof
Copy link
Contributor

raboof commented Nov 28, 2013

I generally prefer the latter when possible - the only downside is you don't get screenshots when the text does not match (but you do get screenshots when the element is not found).

I'd like to get feedback from you guys on what you prefer.

@raboof
Copy link
Contributor Author

raboof commented Dec 25, 2013

I see the Xebium formatter now can emit 'check is' commands, cool!

It gets the syntax wrong in some cases though:

'verifyNotText foo bar'
becomes: '|check|is|verifyNotText|on|foo|bar|'
while it should be something like: '|check not|is|getText|on|foo|bar|'

@raboof
Copy link
Contributor Author

raboof commented Apr 10, 2014

I see the IDE now generates things like "|check|is|verifyText|on|locator|expectedValue|

Shouldn't that be "|check|is|getText|..."?

@amolenaar
Copy link
Member

Both verifyText and assertText call getText from the fixture. Only now (with verify- / assert-) we know if we need to throw a StopTest exception from the fixture.

@raboof
Copy link
Contributor Author

raboof commented Apr 12, 2014

In case of '|check (not)|is|...', in contrast to '|ensure|do|...', we don't know what the expectation is, so we should never throw a StopTest exception. Indeed we don't: we only throw StopTest exception in 'executeDoCommand', which is only invoked from 'do', not from 'is'.

So IMHO we should either generate "|ensure|do|verifyText|on|foo|with|bar|" or "|check|is|getText|on|foo|bar|", but not "|check|is|verifyText|on|foo|bar|", which is the current implementation.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants