I am trying to execute tests on selenium grid.I am getting no such field error when the RemoteDriver.driver.navigate().to(Link); is executed
Related
1)I have created a job in Jenkins to run selenium tests cases which consists of 5 feature files
2)I am using "Execute Shell" of Jenkins to run the test cases
where I have fired the command by going to that particular folder and running command gradle test
eg. >cd ABC
>gradle test
when I run this job by using "build Now" the test cases fails showing error
1)java.lang.IllegalStateException: Failed to load ApplicationContext
2)Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.openqa.selenium.WebDriver]: Factory method 'getWebDriver' threw exception; nested exception is java.lang.NoClassDefFoundError: Could not initialize class com.cosmicapp.webbrowser.FirefoxWebDriver
3)caused by java.lang.NoClassDefFoundError: Could not initialize class com.cosmicapp.webbrowser.FirefoxWebDriver
And when I run the above test cases on my machine it runs fine.
It seems there is a problem in the Jenkins project workspace or Jenkins is not able to invoke firefox or chrome browser.
I try to run grunt test, and Selenium exits without closing the browser. I am unable to see where the exception is coming from.
grunt test
Running "protractor_webdriver:start" (protractor_webdriver) task
Starting Selenium server
Started Selenium server: http://127.94.0.1:4444
Running "protractor:projecttest" (protractor) task
[10:16:33] I/hosted - Using the selenium server at http://localhost:4444/wd/hub
[10:16:33] I/launcher - Running 1 instances of WebDriver
Session created: count=1, browserName=chrome
......Exception thrown: Going to shut down the Selenium server
Shutting down Selenium server: http://127.94.0.1:4444
Shut down Selenium server: http://127.94.0.1:4444 (OKOK)
Fatal error: 10:16:45.529 WARN - Exception thrown
All of my tests are passing. I even added logs to prove the final test passes and exits without exception.
I tried to up my logging from "dots" to "progress" but it doesn't change anything. Any ideas?
I get the following error from chrome driver when running my selenium tests with chrome driver. The test works fine with firefox.
unknown error: failed to parse value of getElementRegion
Here's the code, it fails when trying to click the submit button. I'm using selenium-standalone to run my server, specifying chromedriver with selenium-standalone start --drivers.chrome.version=2.8 and webdriverIO
client
.url(options.url)
.setValue(usernameSelector, username)
.setValue(passwordSelector, password)
.click(submitBtnSelector)
I solved the same problem by deleting the line SELENIUM_PROMISE_MANAGER: false in my conf.js file on my protractor configuration.
I recently switched to the pagefactory model and i noticed when running test in parallel will fail all of the time(It used to work fine before switching over to the page factory model). i have code sample if anyone want to look at it. I am using Selenium webdriver with testng right now. The first test returns the following
org.openqa.selenium.WebDriverException: Build info: version: '2.43.0', revision: '597b76b', time: '2014-09-09 20:52:38'
the rest of the test return the following
org.openqa.selenium.remote.SessionNotFoundException: Session ID is null. Using WebDriver after calling quit()?
also when i run the tests one by one they run normal.
Followed this post -
Selenium - Could not start Selenium session: Failed to start new browser session: Error while launching browser
Error comes up at selenium.start().
I am using selenium rc(2.16) , junit(4.5) in eclipse ide.
The only way to over come this issue is to redeploy our framework in tomcat server, just restart everything.
This is the piece of code that starts selenium
private static HttpCommandProcessor proc;
public static DefaultSelenium selenium;
if (selenium == null) {
proc = new HttpCommandProcessor("localhost", 4444, browserName,
urlName);
selenium = new DefaultSelenium(proc);
**selenium.start();**
selenium.setTimeout(String.valueOf(PAGE_TIMEOUT_TIME));
selenium.useXpathLibrary("javascript-xpath");
selenium.deleteAllVisibleCookies();
}
the selenium server is already started when the execution reaches the above code.
Below is the exception that comes up when execute the tests -
java.lang.RuntimeException: Could not start Selenium session: Failed to start new browser session: Error while launching browser
at com.thoughtworks.selenium.DefaultSelenium.start(DefaultSelenium.java:107)
at <package>.SuperClass.connectToUrl(SuperClass.java:340)
Any help or clue to resolve this thing would be appreciated!