I created a script in Jmeter that works in the gui and I moved it to an AWS instance.
I'm using:
selenium-server-standalone-2.35.0.jar
ChromeDriver (v2.2)
Chromium 37.0.2062.120 Ubuntu 14.04
and Jmeter 2.11
The script works in the gui (where it reaches my site, logs in etc) but in the non gui mode I get this error in the log file:
2014/10/10 17:54:22 ERROR - jmeter.threads.JMeterThread: Test failed! org.openqa.selenium.WebDriverException: unknown error: unable to discover open pages
(Driver info: chromedriver=2.2,platform=Linux 3.13.0-36-generic x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 21.32 seconds
Build info: version: '2.39.0', revision: '14fa800511cc5d66d426e08b0b2ab926c7ed7398', time: '2013-12-16 13:18:38'
System info: host: 'ip-10-1-1-132', ip: '10.1.1.132', os.name: 'Linux', os.arch: 'amd64', os.version: '3.13.0-36-generic', java.version: '1.7.0_65'
Driver info: org.openqa.selenium.chrome.ChromeDriver
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:193)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:554)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:216)
at org.openqa.selenium.chrome.ChromeDriver.startSession(ChromeDriver.java:182)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:111)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:115)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:161)
at com.googlecode.jmeter.plugins.webdriver.config.ChromeDriverConfig.createBrowser(ChromeDriverConfig.java:44)
at com.googlecode.jmeter.plugins.webdriver.config.ChromeDriverConfig.createBrowser(ChromeDriverConfig.java:16)
at com.googlecode.jmeter.plugins.webdriver.config.WebDriverConfig.threadStarted(WebDriverConfig.java:212)
at org.apache.jmeter.threads.JMeterThread$ThreadListenerTraverser.addNode(JMeterThread.java:597)
at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:961)
at org.apache.jorphan.collections.HashTree.traverse(HashTree.java:946)
at org.apache.jmeter.threads.JMeterThread.threadStarted(JMeterThread.java:566)
at org.apache.jmeter.threads.JMeterThread.initRun(JMeterThread.java:554)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:253)
at java.lang.Thread.run(Thread.java:745)
Any ideas?
You are using a version of ChromeDriver from 2013, which in no way whatsoever is going to support v37 of Chrome.
http://chromedriver.storage.googleapis.com/2.11/notes.txt
----------ChromeDriver v2.11 (2014-10-07)----------
Supports Chrome v36-40
So I'd suggest upgrading to v2.11 and retrying & upgrade Selenium whilst you are at it, v2.35 of Selenium is also from 2013.
Related
I am new to Automation and trying to learn Automation as a manual tester. I am trying to execute a simple java code to open a Chrome browser using Selenium Webdrivers and get the below exception. Tried all possible ways to resolve the same and still nothing works. Any help would really help. Thanks.
Starting ChromeDriver 2.28.455520 (cc17746adff54984afff480136733114c6b3704b) on port 3527
Only local connections are allowed.
Exception in thread "main" org.openqa.selenium.WebDriverException: unknown error: cannot find Chrome binary
(Driver info: chromedriver=2.28.455520 (cc17746adff54984afff480136733114c6b3704b),platform=Windows NT 6.3.9600 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 4.67 seconds
Build info: version: '2.51.0', revision: '1af067d', time: '2016-02-05 19:11:55'
System info: host: 'BTP196816', ip: '10.241.51.20', os.name: 'Windows 8.1', os.arch: 'x86', os.version: '6.3', java.version: '1.7.0_99'
Driver info: org.openqa.selenium.chrome.ChromeDriver
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:249)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:131)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:144)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:170)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:159)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:116)
at OpenAdf.LaunchAdf.main(LaunchAdf.java:11)
try using that :
System.setProperty("webdriver.chrome.driver", "C:\\SeleniumDrivers\\chromedriver_win32\\chromedriver.exe");
DesiredCapabilities capability = new DesiredCapabilities();
capability.setCapability("binary", "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe");
WebDriver driver = new ChromeDriver(capability);
You can also try
capability.setCapability("chrome.binary", "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe");
Hope it helps.
System.setProperty("webdriver.chrome.driver", "C:\\SeleniumDrivers\\chromedriver_win32\\chromedriver.exe");
Need to set the chrome driver path and the chrome driver path must be at the location which you gave in the code.
Facing the below issue in Eclipse. Attached the logs. please help with your suggestions
1493505852004 geckodriver INFO Listening on 127.0.0.1:32725
1493505852739 mozprofile::profile INFO Using profile path C:\Users\arora\AppData\Local\Temp\rust_mozprofile.ameyOkKY6RPS
1493505852744 geckodriver::marionette INFO Starting browser C:\Program Files (x86)\Mozilla Firefox\firefox.exe with args []
1493505852744 geckodriver::marionette INFO Connecting to Marionette on localhost:53292
IPDL protocol error: Handler returned error code!
!!! [Parent][DispatchAsyncMessage] Error: PLayerTransaction::Msg_ReleaseLayer Processing error: message was deserialized, but the handler returned false (indicating failure)
IPDL protocol error: Handler returned error code!
!!! [Parent][DispatchAsyncMessage] Error: PLayerTransaction::Msg_ReleaseLayer Processing error: message was deserialized, but the handler returned false (indicating failure)
[GPU 6784] WARNING: pipe error: 109: file c:/builds/moz2_slave/m-rel-w32-00000000000000000000/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346
1493505857734 Marionette INFO Listening on port 53292
Apr 29, 2017 3:44:18 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
Exception in thread "main" org.openqa.selenium.InvalidArgumentException: Expected [object Undefined] undefined to be a string
Build info: version: '3.3.1', revision: '5234b32', time: '2017-03-10 09:04:52 -0800'
System info: host: 'SAGAR', ip: '192.168.1.3', os.name: 'Windows 8.1', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_91'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{moz:profile=C:\Users\arora\AppData\Local\Temp\rust_mozprofile.ameyOkKY6RPS, rotatable=false, timeouts={implicit=0, pageLoad=300000, script=30000}, pageLoadStrategy=normal, platform=ANY, specificationLevel=0, moz:accessibilityChecks=false, acceptInsecureCerts=false, browserVersion=53.0, platformVersion=6.3, moz:processID=6264, browserName=firefox, platformName=windows_nt}]
Session ID: f85ef783-51ac-4d6b-a228-6835999ae465
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:133)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:99)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:43)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:163)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:604)
at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:274)
at org.openqa.selenium.remote.RemoteWebElement.sendKeys(RemoteWebElement.java:98)
at Gmail.main(Gmail.java:25)
Blatantly putting all the log files is not going to make life easier for you. Try to see what the error is about.
A quick search gives me the result that your sendKeys() operation performed for the test on Mozilla version 53.0 might be broken. A bug has already been filed with the Gecko developers for this - here is the link for that.
Also, this seems to be the duplicate of this same question asked 4 days ago - Original Question
The Geckodriver is not working with the every version of Selenium.
You must have the last version of Selenium.
I try to run a selenium client that interacts with remote selenium web driver server.
Some (only some) of my tests are failing because of connection refused.
What should I check on the machine that hosts the server?
com.x.inject.ProvisionException: Guice provision errors:
1) Error in custom provider, org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: '2.44.0', revision: '76d78cf323ce037c5f92db6c1bba601c2ac43ad8', time: '2014-10-23 13:11:40'
System info: host: 'w04.hfa.corp.x.com', ip: '172.28.144.7', os.name: 'Linux', os.arch: 'amd64', os.version: '3.13.0-30-generic', java.version: '1.8.0_25'
Driver info: driver.version: RemoteWebDriver
while locating com.waze.testing.guice.providers.WebDriverProvider
at com.waze.testing.MainModule.configure(MainModule.java:44)
while locating org.openqa.selenium.WebDriver
1 error
at com.x.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1009)
at com.x.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1035)
at com.waze.testing.cucumber.steps.Hooks.before(Hooks.java:39)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Selenium 2.44 and "Native Method" phrase in the traceback makes me think this is a compatibility problem. Upgrade selenium to the latest (2.46 currently) version.
While running my test scripts in win7 IE11 using Selenium WebDriver I am getting below error:
Error:
==============================================================================================
Started InternetExplorerDriver server (64-bit)
2.42.0.0
Listening on port 13127
org.apache.http.impl.client.DefaultRequestDirector tryExecute
INFO: I/O exception (java.net.SocketException) caught when processing request: Software
caused connection abort: recv failed
org.apache.http.impl.client.DefaultRequestDirector tryExecute
INFO: Retrying request
JavaScript error (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 169 milliseconds
Build info: version: '2.41.0', revision: '3192d8a', time: '2014-03-27 17:17:32'
System info: host: 'blr2261913', ip: '10.177.101.114', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.7.0_51'
Session ID: 71972154-3b97-4623-b651-aaa0bb460ffb
Driver info: org.openqa.selenium.ie.InternetExplorerDriver
Capabilities [{platform=WINDOWS, javascriptEnabled=true, elementScrollBehavior=0, ignoreZoomSetting=false, enablePersistentHover=true, ie.ensureCleanSession=f
r=dismiss, version=11, ie.usePerProcessProxy=false, cssSelectorsEnabled=true, ignoreProtectedModeSettings=false, requireWindowFocus=false, handlesAlerts=true,
e, browserAttachTimeout=0, ie.browserCommandLineSwitches=, takesScreenshot=true}]
com.thoughtworks.selenium.SeleniumException: JavaScript error (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 169 milliseconds
Build info: version: '2.41.0', revision: '3192d8a', time: '2014-03-27 17:17:32'
System info: host: 'blr2261913', ip: '10.177.101.114', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.7.0_51'
Session ID: 71972154-3b97-4623-b651-aaa0bb460ffb
Driver info: org.openqa.selenium.ie.InternetExplorerDriver
Capabilities [{platform=WINDOWS, javascriptEnabled=true, elementScrollBehavior=0, ignoreZoomSetting=false, enablePersistentHover=true, ie.ensureCleanSession=f
r=dismiss, version=11, ie.usePerProcessProxy=false, cssSelectorsEnabled=true, ignoreProtectedModeSettings=false, requireWindowFocus=false, handlesAlerts=true,
e, browserAttachTimeout=0, ie.browserCommandLineSwitches=, takesScreenshot=true}]
at com.thoughtworks.selenium.webdriven.SeleneseCommand.apply(SeleneseCommand.java:44)
at com.thoughtworks.selenium.webdriven.Timer.run(Timer.java:40)
at com.thoughtworks.selenium.webdriven.WebDriverCommandProcessor.execute(WebDriverCommandProcessor.java:143)
at com.thoughtworks.selenium.webdriven.WebDriverCommandProcessor.doCommand(WebDriverCommandProcessor.java:73)
at com.thoughtworks.selenium.DefaultSelenium.type(DefaultSelenium.java:317)
Env: Windows7-64 bit, IE11
IEDriver version: Latest i.e 2.42.0
Selenium Server: 2.41.0
I have already followed the steps mentioned https://code.google.com/p/selenium/wiki/InternetExplorerDriver ! NO LUCK!
Have searched enough over net but could not find any solution to my problem.
Any help will be highly appreciated.
Thanks in advance!
I'm not sure if this applies directly to your problem but I have come across something similar when I got the error:
Caused by: java.net.SocketException: Connection reset
Which lead me to a bug raised here: http://bugs.java.com/bugdatabase/view_bug.do?bug_id=7077696
You have recv failed in your error similar to this bug, however it was noted that it's more likely to be Windows Firewall causing the error rather than a bug. Some possible workarounds (from the site):
Run with -Djava.net.preferIPv4Stack=true
Add a firewall exception for the Java binary
Or disable stateful FTP inspection in the firewall
which I believe is done with: netsh advfirewall set global StatefulFTP disable
There is also an issue raised here: https://code.google.com/p/selenium/issues/detail?id=6437
Which applies to the error I have more so but it could possibly apply to yours? As comment #7 (from a project member) states there is a known issue with IE11.
This is may or may not help as I haven't had a chance to test the solutions and I'm not entirely sure of it myself!
I am using chrome browser in selenium project.
Here is the user agent string that I am using:
System.setProperty("webdriver.chrome.driver","C:\\users\\..\\chromedriver.exe");
driver = new ChromeDriver();
What happens IF I run the script:
It open the chrome browser and after some time it close it and giving error:
org.openqa.selenium.WebDriverException: unknown error: unable to
discover open pages (Driver info: chromedriver=2.2,platform=Windows
NT 6.1 x86) (WARNING: The server did not provide any stacktrace
information) Command duration or timeout: 26.83 seconds Build info:
version: '2.39.0', revision: 'ff23eac', time: '2013-12-16 16:12:12'
System info: host: 'QAVM-9', ip: '27.101.1.26', os.name: 'Windows 7',
os.arch: 'x86', os.version: '6.1', java.version: '1.7.0_45' Driver
info: org.openqa.selenium.chrome.ChromeDriver at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at
org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:193)
at
org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
at
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:554)
at
org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:216)
at
org.openqa.selenium.chrome.ChromeDriver.startSession(ChromeDriver.java:182)
at
org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:111)
at
org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:115)
at
org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:161)
at
org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:150)
at
org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:139)
Please help me, It completely stop the execution.
Let me know in case need any other information.
I would suggest you to update your chrome driver since your version is 2.2 and the latest is 2.9. It might be possible that your existing chrome driver might not be supporting your chrome browser if the browser is of latest version.
Chrome driver versions are here
Also check the release notes here. Each chromedriver mentions which chrome browser versions
it supports.
Here's what I did to get rid of that error (
unknown error: unable to discover open pages
)
In your protractor config file, add the following:
capabilities: {
browserName: 'chrome',
chromeOptions: {
args: ['--no-sandbox']
}
},
The most important line there is the --no-sandbox; adding that line somehow gets rid of that error.
I am not exactly sure why it works but it's a workaround I found while digging around online.