Kartik
Kartik

Reputation: 21

selenium cucumber driver.quit() is stuck when I am using saucelabs

I am new to selenium. I have been running given selenium test scripts always using below and never I had issues:

But suddenly for the last 2 days, I have been facing an issue, that is : My script is stuck at the driver.quit() in @After, for hours no Error or anything. IntelliJ is showing the script as running (but not seeing any test progress in the console).

Note: These scripts are working fine when I run locally, but the issue is when I am running with sauce labs.

code is:

@After

public void tearDown(Scenario scenario) {
    if (driver()!=null) {
        System.out.println("Printing till here"); 
        driver().quit();  
        System.out.println("Not printing");
    }

After this intellij script is running, and no error in the console. Not sure what is happening here.

Please guide me on how to fix this one.

I tried different ways, but no luck;

Upvotes: 1

Views: 93

Answers (0)

Related Questions