-2

Trying to run testng suite compiled jar on remote linux machine.

Problem I have is, if I run tests, FF open url I have defined and after that closing brower, and so on.

org.openqa.selenium.NoSuchElementException: Unable to locate element: {"method":"name","selector":"username"}

Selenium 2.53.0 FF 45.0

Any idea why my test just open browser and close?

juherr
  • 5,640
  • 1
  • 21
  • 63
Karol
  • 165
  • 2
  • 6
  • 19

2 Answers2

0

NoSuchElementException is thrown when element does not exist. It may not be the reason for fx crash. The possibilities are :

Some where in the code you will be closing the driver.

I had faced the same issue earlier.

Try to upgrade your firefox to the latest version.

Try to set the firefox driver using setProperties

System.setProperty("webdriver.firefox.bin","C:\\Users\\AppData\\Local\\Mozilla Firefox\\firefox.exe");
WebDriver driver=new  FirefoxDriver(); 

Follow the link to upgrade or downgrade fx: https://support.mozilla.org/t5/Install-and-Update/Install-an-older-version-of-Firefox/ta-p/1564

Below are some of the helpful links.

Firefox crashes when started by Selenium firefox driver

Which Firefox version is compatible with Selenium 2.53.0?

Community
  • 1
  • 1
Anand Ganesh S S
  • 128
  • 1
  • 2
  • 9
0

I was using wrong url without "/" on the end, after I changed all working now.

Karol
  • 165
  • 2
  • 6
  • 19