Closed vivekbrahmadandi closed 8 years ago
Please refer to the referenceConf.js on seleniumArgs. When webdriver-manager start
runs, it launches a java command with the options set when it launches (including the internet explorer driver). Once the java command starts, protractor does not give it additional options for other drivers.
webdriver-manager update --ie32
or webdriver-manager update --ie
for your global install of webdriver-managerwebdriver-manager start --ie32
or webdriver-manager start --ie
The binaries will be saved in C:\Users\vivekb\AppData\Roaming\npm\node_modules\protractor\selenium\
. If you prefer to use your D:\ drive, use the out_dir
command line option for both the update and start commands. See webdriver-manager help
.
Please direct general support questions like this one to an appropriate support channel, see https://github.com/angular/protractor/blob/master/CONTRIBUTING.md#questions
seleniumAddress: null, // The selenium session id allows Protractor to attach to an existing selenium // browser session. The selenium session is maintained after the test has // completed. Ignored if seleniumAddress is null. seleniumSessionId: null,
how to mention selenium session id,
here is my config file
seleniumAddress: 'http://127.0.0.1:4444/wd/hub', localSeleniumStandaloneOpts: { // The port to start the Selenium Server on, or null if the server should // find its own unused port. port: null, // Additional command line options to pass to selenium. For example, // if you need to change the browser timeout, use // seleniumArgs: ['-browserTimeout=60'] args: ['-Dwebdriver.ie.driver=D:\IEDriverServer_Win32_2.52.0.exe'] },
I wanted to run the suites in IE11 browser
20:08:46.019 INFO - Executing: [new session: Capabilities [{platform=ANY, count=1, browserName=internet explorer, version=11}]])
20:08:46.029 INFO - Creating a new session for Capabilities [{platform=ANY, count=1, browserName=internet explorer, version=11}]
20:08:46.059 WARN - Exception thrown
java.util.concurrent.ExecutionException: org.openqa.selenium.WebDriverException: java.lang.reflect.InvocationTargetException
Build info: version: '2.52.0', revision: '4c2593c', time: '2016-02-11 19:06:42'
System info: host: 'NBLAP99', ip: '192.168.7.18', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_71'
Driver info: driver.version: unknown
at java.util.concurrent.FutureTask.report(Unknown Source)
at java.util.concurrent.FutureTask.get(Unknown Source)
at org.openqa.selenium.remote.server.DefaultSession.execute(DefaultSession.java:183)
at org.openqa.selenium.remote.server.DefaultSession.
20:12:04.956 WARN - Exception: The path to the driver executable must be set by the webdriver.ie.driver system property; for more information, see https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver. The latest version can be downloaded from http://selenium-release.storage.googleapis.com/index.html
So what's going on behind the scenes:
webdriver-manager update --ie32
downloads the 32-bit version of IEDriver. I would suggest using the 32 bit version.webdriver-manager start --ie32
will launch a java command. In this java command, since you passed the option for --ie32
, webdriver-manager will look at its saved drivers and if it contains the internet explorer driver, it will launch it with the -Dwebdriver.ie.driver
argument. See https://github.com/angular/protractor/blob/master/bin/webdriver-manager#L334. This is really your best bet for launching with iedriver.
Do I need to set this property -Dwebdriver.ie.driver in conf file or path env variable
No you do not have to set that in your environment variable. The jar file is fed that information. All you need to do is give it the --ie32
option with webdriver-manager start --ie32
When I start the server using the command webdriver-manager start .
seleniumProcess.pid: 8092 18:49:04.240 INFO - Launching a standalone Selenium Server Setting system property webdriver.chrome.driver to C:\Users\vivekb\AppData\Roaming\npm\node_modules\protractor\selenium\chromedriver_2.21.exe 18:49:04.420 INFO - Java: Oracle Corporation 24.71-b01 18:49:04.420 INFO - OS: Windows 7 6.1 amd64 18:49:04.430 INFO - v2.52.0, with Core v2.52.0. Built from revision 4c2593c 18:49:04.500 INFO - Driver class not found: com.opera.core.systems.OperaDriver 18:49:04.500 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered 18:49:04.500 INFO - Driver provider org.openqa.selenium.safari.SafariDriver registration is skipped: registration capabilities Capabilities [{platform=MAC, browserName=safari, version=}] does not match the current platform VISTA 18:49:04.757 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub 18:49:04.757 INFO - Selenium Server is up and running.
When i add Internet explorer driver property to selenium args property and selenium address seleniumArgs: ['-Dwebdriver.ie.driver=D:\IEDriverServer_Win32_2.52.0.exe'], seleniumAddress: 'http://localhost:4444/wd/hub',
When I run my suites for IE 11 browser , I can not see the logs in server console.
But i can see the protracto console having throwing the exceptions.
A Jasmine spec timed out. Resetting the WebDriver Control Flow.
Failed: Error while running testForAngular: Page reload detected during async script (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 1.60 seconds Build info: version: '2.52.0', revision: '4c2593c', time: '2016-02-11 19:06:42' System info: host: 'NBLAP99', ip: '192.168.7.18', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_71' Session ID: 870419fd-9618-42aa-8578-42736a091ab3 Driver info: org.openqa.selenium.ie.InternetExplorerDriver Capabilities [{platform=WINDOWS, javascriptEnabled=true, elementScrollBehavior=0, ignoreZoomSetting=false, enablePersistentHover=true, ie.ensureCleanSession=false, browserNa viour=dismiss, version=11, pageLoadStrategy=normal, ie.usePerProcessProxy=false, cssSelectorsEnabled=true, ignoreProtectedModeSettings=false, requireWindowFocus=false, initialBr ssApi=false, nativeEvents=true, browserAttachTimeout=0, ie.browserCommandLineSwitches=, takesScreenshot=true}] Stack: Error: Failed: Error while running testForAngular: Page reload detected during async script (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 1.60 seconds Build info: version: '2.52.0', revision: '4c2593c', time: '2016-02-11 19:06:42' System info: host: 'NBLAP99', ip: '192.168.7.18', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_71' Session ID: 870419fd-9618-42aa-8578-42736a091ab3 Driver info: org.openqa.selenium.ie.InternetExplorerDriver Capabilities [{platform=WINDOWS, javascriptEnabled=true, elementScrollBehavior=0, ignoreZoomSetting=false, enablePersistentHover=true, ie.ensureCleanSession=false, browserNa viour=dismiss, version=11, pageLoadStrategy=normal, ie.usePerProcessProxy=false, cssSelectorsEnabled=true, ignoreProtectedModeSettings=false, requireWindowFocus=false, initialBr ssApi=false, nativeEvents=true, browserAttachTimeout=0, ie.browserCommandLineSwitches=, takesScreenshot=true}] at C:\Users\vivekb\AppData\Roaming\npm\node_modules\protractor\nodemodules\jasminewd2\index.js:101:16 at Promise.invokeCallback (C:\Users\vivekb\AppData\Roaming\npm\node_modules\protractor\nodemodules\selenium-webdriver\lib\promise.js:1329:14) at TaskQueue.execute (C:\Users\vivekb\AppData\Roaming\npm\node_modules\protractor\nodemodules\selenium-webdriver\lib\promise.js:2790:14) at TaskQueue.executeNext (C:\Users\vivekb\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2773:21)
1 spec, 1 failure Finished in 170.082 seconds Shutting down selenium standalone server.
C:\Users\vivekb\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\http\index.js:365 onError(new Error(message)); ^ Error: ECONNREFUSED connect ECONNREFUSED 192.168.7.18:62366 at ClientRequest. (C:\Users\vivekb\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\http\index.js:365:15)
at emitOne (events.js:77:13)
at ClientRequest.emit (events.js:169:7)
at Socket.socketErrorListener (_http_client.js:259:9)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at emitErrorNT (net.js:1253:8)
at doNTCallback2 (node.js:439:9)
at process._tickCallback (node.js:353:17)
From: Task: WebDriver.quit()
at WebDriver.schedule (C:\Users\vivekb\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver.js:344:17)
at WebDriver.quit (C:\Users\vivekb\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver.js:419:23)
at C:\Users\vivekb\AppData\Roaming\npm\nodemodules\protractor\built\driverProviders\driverProvider.js:67:16
at Promise.invokeCallback (C:\Users\vivekb\AppData\Roaming\npm\node_modules\protractor\nodemodules\selenium-webdriver\lib\promise.js:1329:14)
at TaskQueue.execute (C:\Users\vivekb\AppData\Roaming\npm\node_modules\protractor\nodemodules\selenium-webdriver\lib\promise.js:2790:14)
at TaskQueue.executeNext (C:\Users\vivekb\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2773:21)
at C:\Users\vivekb\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2697:25
at C:\Users\vivekb\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:639:7
at process._tickCallback (node.js:366:9)
[launcher] Process exited with error code 1