0

when I run the (driver.quit), it opens the firefox browser and quit it as expected but error is given as "Unable to find executable for: taskkill".
I set the environment variable PATH as "C:\Windows\System32" and run the test. But I still getting this error.

I am using Selenium-java-2.48.2.jar and Firefox 42.0

public void closeBrowser(){
        try{            
            driver.quit();          
        }
        catch(Exception ex){
            System.out.println(ex.getMessage());
        }
    }
Mukesh Takhtani
  • 852
  • 5
  • 15
  • try downgrading your firefox it might work, – sameer joshi Jan 29 '16 at 06:49
  • have you restart you IDE after setting up the path ? – Shubham Jain Jan 29 '16 at 07:04
  • 1
    in selenium changelog you will find latest support is available only till FF41.0.2 – Mrunal Gosar Jan 29 '16 at 07:36
  • @MrunalGosar I tried with the FF41.0.2 but still getting this error. – kushan chathuranga Jan 29 '16 at 09:52
  • @kushanchathuranga Not sure why but same thing is working absolutely fine here with FF41.0.2 and WD 2.48.2..can u print the whole stacktrace here..lets see if we are able to find anything in that – Mrunal Gosar Jan 29 '16 at 10:31
  • @MrunalGosar I have share the screen shots for the whole stacktrace. Please refer the bellow link and share your thoughts. https://drive.google.com/folderview?id=0B5QNAucEkHx5LTlsYmdLdl9xaWM&usp=sharing – kushan chathuranga Feb 01 '16 at 06:55
  • @kushanchathuranga..I think you have already closed browser and then you are calling quit method.. I would suggest you to try simple code snippet and see if this happens..also there is some known issue with testng 6.10. downgrade one version – Mrunal Gosar Feb 01 '16 at 17:37

1 Answers1

0

I would suggest to use driver.close() instead driver.quit(). To understnad difference between them please see this question.

Community
  • 1
  • 1
Eugene
  • 1,865
  • 3
  • 21
  • 24