question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to run many different Scenario() without closing the browser?

See original GitHub issue

How to run many different Scenario() without closing the browser? This is my code:

Before((I) => {
    I.amOnPage('/');
    I.fillField('email', 'someEmail@gmail.com');
    I.fillField('password', '123456');
    I.click('Sign in');
});

Scenario('Check to see if it has landing page and welcome msg', (I) => {
    I.see('Welcome to Casefriend Version 1.0');
    I.amOnPage('http://cflocal/#landing');


});

Scenario('Logining into Casefriend', (I) => {
    I.click('Users');
    I.click('New User');
});

This code passes correctly but it opens firefox, test Scenario 1 then closes firefox, opens again, and tests second Scenario. I want it to do everything on one single firefox instance. How can I do?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:3
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
APshenkincommented, Jun 1, 2017

Closing this issue, now there is restart option that can be used for disabling browser restart

1reaction
Nighthawk14commented, Jul 22, 2016

@smozely I created a PR with this feature for Protractor/Selenium, I can try to look into it for webdriver.io or If you want to have a look feel free. https://github.com/Codeception/CodeceptJS/pull/167

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to run many different Scenario() without closing ... - GitHub
How to run many different Scenario() without closing the browser ? This is my code: Before((I) => { ...
Read more >
How to Run All selenium tests without Closing Browser using ...
Use BeforeSuite and AfterSuite to open drivers and close drivers respectively. And in BeforeClass check if the driver instance is ...
Read more >
Is it possible to run multiple Examples in a Scenario Outline ...
A good option to avoid having to close/re-open the browser between tests is to look at Hooks in SpecFlow. You can use a...
Read more >
Stop closing browser after each scenario cucumber
You are most likely calling browser.quit() or possible browser.close() somewhere. The trick is not to do that until you are done using that...
Read more >
How to run multiple test cases without closing the browser object
Write driver.quit() command in the [TearDown] annotation in the class which will close the browser once after the execution of all the [Test] ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found