selenium-ide icon indicating copy to clipboard operation
selenium-ide copied to clipboard

Request: Break command is missing in new selenium IDE

Open mondiaz opened this issue 8 years ago • 3 comments

🐛 Bug Report

A clear and concise description of what the bug is.

Hi, in my old selenium IDE tests, I used the "break" command, which is not available in the new Selenium IDE. I used "break" in cases where the test required some action be performed by a human, where the amount of time could vary.

Can we get the "break" command back?

Workarounds

The best I can do now is insert a "pause" command with a very long timeout, but since we also track how long it takes the suite to run, a hard-coded timeout might be too short at times and too long other times.

Another way of achieving a similar behavior might be through "if", "else", and "end" commands, but my JavaScript skills are pretty much nil (unless you count Google, copy, paste), which is why Selenium IDE has been our go-to.

To Reproduce

Steps to reproduce the behavior: These aren't exactly steps, but here is a description of what we do.

One of our test cases checks that, after a new user creates their account, they receive an activation email, after which, the test resumes. This is achieved by inserting a "break" command before a step that doesn't exist until that activation is complete. We use a randomized email address with our domain, to ensure we're testing a new user experience. The activation email goes to our email system, which needs to be checked by whoever on our team is running the test suite.

Expected behavior

A clear and concise description of what you expected to happen: This is a snippet of the test case / Selenium IDE commands we use to test account creation and activation.

<tr>
	<td>clickAndWait</td>
	<td>css=a.register</td>
	<td></td>
</tr>
<tr>
	<td>assertLocation</td>
	<td>glob:*&amp;enrollment_action=enroll</td>
	<td></td>
</tr>
<tr>
	<td>open</td>
	<td>/</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>link=Support</td>
	<td></td>
</tr>
<tr>
	<td>waitForElementPresent</td>
	<td>linkText=Sign in</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>linkText=Sign in</td>
	<td></td>
</tr>
<tr>
	<td>break</td>
	<td></td>
	<td></td>
</tr>
<!--1) Check the suspended ticket view-->
<!--2) Open the most recent activation ticket and copy the activation URL into a new tab-->
<!--3) Close activation tab-->
<!--4) Click Selenium resume button-->
<tr>
	<td>type</td>
	<td>id=login-email</td>
	<td>javascript{&quot;seleniumtestrandom+&quot; + storedVars['rand'] + &quot;@example.com&quot;;}</td>
</tr>

Project file reproducing this issue (highly encouraged)

Please provide a project file .side that reproduces this issue. I have not yet converted this test to .side, so I don't have a .side file for it. Here instead is the .html file in full (converted to .txt since I wasn't allowed to upload .html).

RegistrationFlow_copy.txt

Environment

OS: OS X El Capitan (Version 10.11.6) Selenium IDE Version: 3.4.4 Browser: Firefox User Agent String info: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:63.0) Gecko/20100101 Firefox/63.0

mondiaz avatar Nov 20 '18 02:11 mondiaz

Have you tried placing a breakpoint and resuming after that? You can place a breakpoint by pressing B when a command is selected. The test will halt until you resume.

Cheers, Tomer On 20 Nov 2018, 4:26 +0200, Monica Diaz [email protected], wrote:

🐛 Bug Report A clear and concise description of what the bug is. Hi, in my old selenium IDE tests, I used the "break" command, which is not available in the new Selenium IDE. I used "break" in cases where the test required some action be performed by a human, where the amount of time could vary. Can we get the "break" command back? Workarounds The best I can do now is insert a "pause" command with a very long timeout, but since we also track how long it takes the suite to run, a hard-coded timeout might be too short at times and too long other times. Another way of achieving a similar behavior might be through "if", "else", and "end" commands, but my JavaScript skills are pretty much nil (unless you count Google, copy, paste), which is why Selenium IDE has been our go-to. To Reproduce Steps to reproduce the behavior: These aren't exactly steps, but here is a description of what we do. One of our test cases checks that, after a new user creates their account, they receive an activation email, after which, the test resumes. This is achieved by inserting a "break" command before a step that doesn't exist until that activation is complete. We use a randomized email address with our domain, to ensure we're testing a new user experience. The activation email goes to our email system, which needs to be checked by whoever on our team is running the test suite. Expected behavior A clear and concise description of what you expected to happen: These are the Selenium IDE commands we use to test account creation and activation.

clickAndWait css=a.register assertLocation glob:*&enrollment_action=enroll open / click link=Support waitForElementPresent linkText=Sign in click linkText=Sign in break type id=login-email javascript{"seleniumtestrandom+" + storedVars['rand'] + "@example.com";} Project file reproducing this issue (highly encouraged) Please provide a project file .side that reproduces this issue. I have not yet converted this test to .side, so I don't have a .side file for it. Here instead is the .html file in full (converted to .txt since I wasn't allowed to upload .html). RegistrationFlow_copy.txt Environment OS: OS X El Capitan (Version 10.11.6) Selenium IDE Version: 3.4.4 Browser: Firefox User Agent String info: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:63.0) Gecko/20100101 Firefox/63.0 — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

corevo avatar Nov 20 '18 07:11 corevo

@corevo That works for me for one instance, but it doesn't save in the script. Having the hard break command is useful for me as well. I have some pages that I cannot overcome what's needed using IDE (import a file or an elusive confirmation). So, having the break in the script saved means I don't have to remember to scroll through, find the spot to put it, and put a temporary break each time I open it.

98gmarquee avatar Nov 20 '18 17:11 98gmarquee

Fixed in 10e3c67d
The next version will have a debugger command, that will break the execution and enter the IDE's debug mode.

corevo avatar Nov 29 '18 08:11 corevo