Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding ability to check if last command pass/failed #369

Closed
modnar1226 opened this issue Aug 24, 2018 · 6 comments
Closed

Adding ability to check if last command pass/failed #369

modnar1226 opened this issue Aug 24, 2018 · 6 comments

Comments

@modnar1226
Copy link

🚀 Feature Proposal

A clear and concise description of what the feature is.
2 Parts.
Part 1: Toggle the automatic stoppage of the runner using a global variable either as a command or a UI feature.
Part 2: When stoppage is turned off, ability to check status of a previous command using a js statement.

Motivation

Please outline the motivation for the proposal.

It would open up avenues for testing if some object failed to load, do this instead, or adding logic for test cases to handle problematic areas.

Example

Please provide an example for how this feature would be used.

Scenario: runner clicks a link, its buggy so it opens 2 windows. The test also opens other windows later in the test causing pre-programmed logic to fail due to window numbers being off count.

Example: being able to test if the last command failed and being able to try another window number.
command: if
target: ${!lastCommandOK}
value: Try something else.

@twnew
Copy link

twnew commented Aug 26, 2018

target: ${!lastCommandOK}

Since the variable names are the same, I guess this is essentially the same feature/idea that Kantu has, or?

See here: ${!lastCommandOK}

@modnar1226
Copy link
Author

Yes the idea comes from Kantu, although the variable could be called anything.

@corevo
Copy link
Member

corevo commented Sep 3, 2018

If a command fails then the test throws and quits.
It seemed to me that the correct feature proposal would be to add try and catch commands to the control flow.
This type of "magic" variable goes against the paradigm that control flow is trying to push.
I am not familiar with any composable and scalable control flow structure, that instead of throw-try-catch, gives you a way to check if the last command was successful (other than runtime.lastError, and we don't even use that).

@M3ssman
Copy link

M3ssman commented Sep 6, 2018

Anybody can clear the Relation between Selenium IDE and Kantu?
Thought the later one has been forked from Selenium?

@twnew
Copy link

twnew commented Sep 15, 2018

This type of "magic" variable goes against the paradigm that control flow is trying to push.

Totally agree - but it works ;-)

Anybody can clear the Relation between Selenium IDE and Kantu?
Thought the later one has been forked from Selenium?

Kantu was actually the first new Selenium IDE. I used it already last September. They started at a time when there was no official Selenium IDE TNG project yet. So the code base is completely different, it's not a fork.

@tourdedave
Copy link

As Tomer suggested, this will be handled with try and catch commands in control flow. Closing this and will track the progress in #718.

@lock lock bot locked and limited conversation to collaborators Aug 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants