I'm trying to run a simple protractor test in IE11 on Win 8.1.
My test:
it("should navigate to from the homepage to the add contact page", function () {
browser.get("http://localhost:4000/");
// ... it already crashes here
});
My config:
exports.config = {
// run in multiple browsers
multiCapabilities:[
{
'browserName': 'internet explorer',
}
],
specs: ['./**/*js'],
// Options to be passed to Jasmine-node.
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000
},
onPrepare: function () {
require('jasmine-reporters');
jasmine.getEnv().addReporter(
new jasmine.JUnitXmlReporter('xmloutput', true, true)
);
}
};
The error:
Starting selenium standalone server...
[launcher] Running 1 instances of WebDriver
Selenium standalone server started at http://169.254.80.80:31289/wd/hub
[31mF[0m
Failures:
1) add new contact page should navigate to from the homepage to the add contact page
Message:
[31mUnknownError: JavaScript error (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 63 milliseconds
Build info: version: '2.44.0', revision: '76d78cf', time: '2014-10-23 20:02:37'
System info: host: 'Florian-Lenovo', ip: '169.254.80.80', os.name: 'Windows 8.1', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_25'
Driver info: org.openqa.selenium.ie.InternetExplorerDriver
Capabilities [{browserAttachTimeout=0, enablePersistentHover=true, ie.forceCreateProcessApi=false, ie.usePerProcessProxy=false, ignoreZoomSetting=false, handlesAlerts=true, version=11, platform=WINDOWS, nativeEvents=true, ie.ensureCleanSession=false, elementScrollBehavior=0, ie.browserCommandLineSwitches=, requireWindowFocus=false, browserName=internet explorer, initialBrowserUrl=http://localhost:22540/, takesScreenshot=true, javascriptEnabled=true, ignoreProtectedModeSettings=false, enableElementCacheCleanup=true, cssSelectorsEnabled=true, unexpectedAlertBehaviour=dismiss}]
Session ID: 2b2e9619-3eb8-493f-bc9d-5354a91f7f8b[0m
Stacktrace:
UnknownError: JavaScript error (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 63 milliseconds
Build info: version: '2.44.0', revision: '76d78cf', time: '2014-10-23 20:02:37'
System info: host: 'Florian-Lenovo', ip: '169.254.80.80', os.name: 'Windows 8.1', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_25'
Driver info: org.openqa.selenium.ie.InternetExplorerDriver
Capabilities [{browserAttachTimeout=0, enablePersistentHover=true, ie.forceCreateProcessApi=false, ie.usePerProcessProxy=false, ignoreZoomSetting=false, handlesAlerts=true, version=11, platform=WINDOWS, nativeEvents=true, ie.ensureCleanSession=false, elementScrollBehavior=0, ie.browserCommandLineSwitches=, requireWindowFocus=false, browserName=internet explorer, initialBrowserUrl=http://localhost:22540/, takesScreenshot=true, javascriptEnabled=true, ignoreProtectedModeSettings=false, enableElementCacheCleanup=true, cssSelectorsEnabled=true, unexpectedAlertBehaviour=dismiss}]
Session ID: 2b2e9619-3eb8-493f-bc9d-5354a91f7f8b
at new bot.Error (C:\Users\Florian\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\atoms\error.js:113:18)
at Object.bot.response.checkResponse (C:\Users\Florian\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\atoms\response.js:106:9)
at C:\Users\Florian\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\webdriver.js:362:20
at C:\Users\Florian\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\goog\base.js:1582:15
at [object Object].webdriver.promise.ControlFlow.runInNewFrame_ (C:\Users\Florian\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:1654:20)
at notify (C:\Users\Florian\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:465:12)
at notifyAll (C:\Users\Florian\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:442:7)
at resolve (C:\Users\Florian\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:420:7)
at [object Object].fulfill (C:\Users\Florian\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:535:5)
at C:\Users\Florian\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:1520:10
==== async task ====
Protractor.get(http://localhost:4000/) - reset url
at [object Object].webdriver.WebDriver.schedule (C:\Users\Florian\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\webdriver.js:345:15)
at [object Object].Protractor.executeScript_ (C:\Users\Florian\AppData\Roaming\npm\node_modules\protractor\lib\protractor.js:223:22)
at [object Object].Protractor.get (C:\Users\Florian\AppData\Roaming\npm\node_modules\protractor\lib\protractor.js:440:8)
at [object Object].<anonymous> (C:\OneDrive\Projects\Gyst\Gyst.Web\Scripts\tests\e2e\contacts\addNewContactSpecs.ts:10:17)
at C:\Users\Florian\AppData\Roaming\npm\node_modules\protractor\node_modules\jasminewd\index.js:94:14
at [object Object].webdriver.promise.ControlFlow.runInNewFrame_ (C:\Users\Florian\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:1654:20)
at [object Object].webdriver.promise.ControlFlow.runEventLoop_ (C:\Users\Florian\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:1518:8)
==== async task ====
Asynchronous test function: it()
at [object Object].<anonymous> (C:\Users\Florian\AppData\Roaming\npm\node_modules\protractor\node_modules\jasminewd\index.js:93:33)
at [object Object].<anonymous> (C:\Users\Florian\AppData\Roaming\npm\node_modules\protractor\node_modules\minijasminenode\lib\async-callback.js:45:37)
at [object Object].jasmine.Block.execute (C:\Users\Florian\AppData\Roaming\npm\node_modules\protractor\node_modules\minijasminenode\lib\jasmine-1.3.1.js:1174:17)
at [object Object].jasmine.Queue.next_ (C:\Users\Florian\AppData\Roaming\npm\node_modules\protractor\node_modules\minijasminenode\lib\jasmine-1.3.1.js:2209:31)
at onComplete (C:\Users\Florian\AppData\Roaming\npm\node_modules\protractor\node_modules\minijasminenode\lib\jasmine-1.3.1.js:2205:18)
at [object Object].jasmine.WaitsForBlock.execute (C:\Users\Florian\AppData\Roaming\npm\node_modules\protractor\node_modules\minijasminenode\lib\jasmine-1.3.1.js:2704:5)
at [object Object]._onTimeout (C:\Users\Florian\AppData\Roaming\npm\node_modules\protractor\node_modules\minijasminenode\lib\jasmine-1.3.1.js:2718:12)
Error
at [object Object].<anonymous> (C:\OneDrive\Projects\Gyst\Gyst.Web\Scripts\tests\e2e\contacts\addNewContactSpecs.ts:9:5)
at [object Object].jasmine.Env.describe_ (C:\Users\Florian\AppData\Roaming\npm\node_modules\protractor\node_modules\minijasminenode\lib\jasmine-1.3.1.js:913:21)
at [object Object].jasmine.Env.describe (C:\Users\Florian\AppData\Roaming\npm\node_modules\protractor\node_modules\minijasminenode\lib\jasmine-1.3.1.js:898:15)
at describe (C:\Users\Florian\AppData\Roaming\npm\node_modules\protractor\node_modules\minijasminenode\lib\jasmine-1.3.1.js:658:27)
at Object.<anonymous> (C:\OneDrive\Projects\Gyst\Gyst.Web\Scripts\tests\e2e\contacts\addNewContactSpecs.ts:1:34)
Finished in 1.015 seconds
[31m1 test, 1 assertion, 1 failure
[0m
Shutting down selenium standalone server.
[launcher] 0 instance(s) of WebDriver still running
[launcher] internet explorer #1 failed 1 test(s)
[launcher] overall: 1 failed spec(s)
[launcher] Process exited with error code 1
I'm still pretty new to protractor and I don't have a clue what to do with this.
My tests run fine in Chrome and Firefox.
Any ideas?
try this one, for me it helped with a similar error saying A Jasmine spec timed out. Resetting the WebDriver Control Flow.
protractor-conf.js
{"browserName": "internet explorer",
"ie.forceCreateProcessApi": true,
"ie.browserCommandLineSwitches": "-private",
"ie.ensureCleanSession": "true",
"seleniumAddress": 'http://10.0.1.XXX:4444/wd/hub'
}
Ensure that TabProcGrowth" = dword: 00000000 in Path HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main is set.
IEExplorerDriver is expected to implement asynchronous script executions except that there are a couple of known issues, that the driver can be slow and often times out waiting for page load:
http://angular.github.io/protractor/#/browser-setup
https://github.com/angular/protractor/issues/1052
In your case as per the logs you provided, the lines somehow indicates a timeout has happen.
It's still an open issue for the Protactor team and hopefully, they will come up with a solution soon.
Another thing to possibly consider is that, Protactor uses Promises in order to execute scripts asynchronously, which in terms of browser support is currently still in Preview release in IE11
https://status.modern.ie/promiseses6
For none angular sites instead of driver.get use below code .
browser.driver.get("https://material.angularjs.org/latest/demo/radioButton");
Also go Internet options in IE>IE options and enable protected mode for all the zones
I managed to solve this with below capabilities in my config,js
onPrepare: function () {
browser.driver.ignoreSynchronization = true;// for non-angular set true. default value is false
browser.waitForAngularEnabled(false); // for non-angular set false. default value is true
browser.driver.manage().window().setSize(1280, 1024);
},
capabilities: {
browserName: 'internet explorer',
platform: 'ANY',
version: '11'
},
Related
I'm trying to run a simple test script using protractor.
Environment:
Node Version: v9.8.0
Protractor Version: 5.4.1
Angular Version: 1.x
Browser(s): Mozilla Firefox 60.1.0
Operating System and Version: HELiOS release 6.10
Here's my protractor config file.
exports.config = {
specs: ['todo-spec.js'],
capabilities: {
browserName: 'firefox',
marionette : true
}
};
This is my test script (todo-spec.js)
describe('application homepage', function() {
it('should open homepage', function() {
console.log("Opening localhost app");
browser.get('http://localhost:8080/app/');
browser.sleep(20000); // just to check if application loaded or not
});
});
This is my node_modules/protractor/node_modules/webdriver-manager/selenium/ directory looks like:
When I run my test using /path/to/protractor conf.js, I'm getting below mentioned error.
[16:51:03] I/launcher - Running 1 instances of WebDriver
[16:51:03] I/local - Starting selenium standalone server...
[16:51:04] I/local - Selenium standalone server started at http://<ip-address>:45089/wd/hub
Started
Opening localhost
F
Failures:
1) application homepage should open homepage
Message:
Failed: Browsing context has been discarded
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:13:22.693Z'
System info: host: 'HOSTNAME', ip: 'ip_address', os.name: 'Linux', os.arch: 'i386', os.version: '2.6.32-754.3.5.el6.x86_64', java.version: '1.8.0_181'
Driver info: driver.version: unknown
Stack:
NoSuchWindowError: Browsing context has been discarded
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:13:22.693Z'
System info: host: 'HOSTNAME', ip: 'ip_address', os.name: 'Linux', os.arch: 'i386', os.version: '2.6.32-754.3.5.el6.x86_64', java.version: '1.8.0_181'
Driver info: driver.version: unknown
at Object.checkLegacyResponse (/export/home/test/protractor_test_2/node_modules/selenium-webdriver/lib/error.js:546:15)
at parseHttpResponse (/export/home/test/protractor_test_2/node_modules/selenium-webdriver/lib/http.js:509:13)
at doSend.then.response (/export/home/test/protractor_test_2/node_modules/selenium-webdriver/lib/http.js:441:30)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:118:7)
From: Task: Protractor.get(http://localhost:8080/app/) - reset url
at thenableWebDriverProxy.schedule (/export/home/test/protractor_test_2/node_modules/selenium-webdriver/lib/webdriver.js:807:17)
at ProtractorBrowser.executeScriptWithDescription (/export/home/test/protractor_test_2/node_modules/protractor/built/browser.js:404:28)
at driver.controlFlow.execute.then.then.then (/export/home/test/protractor_test_2/node_modules/protractor/built/browser.js:679:25)
at ManagedPromise.invokeCallback_ (/export/home/test/protractor_test_2/node_modules/selenium-webdriver/lib/promise.js:1376:14)
at TaskQueue.execute_ (/export/home/test/protractor_test_2/node_modules/selenium-webdriver/lib/promise.js:3084:14)
at TaskQueue.executeNext_ (/export/home/test/protractor_test_2/node_modules/selenium-webdriver/lib/promise.js:3067:27)
at asyncRun (/export/home/test/protractor_test_2/node_modules/selenium-webdriver/lib/promise.js:2927:27)
at /export/home/test/protractor_test_2/node_modules/selenium-webdriver/lib/promise.js:668:7
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:118:7)
From: Task: Run it("should open homepage") in control flow
at UserContext.<anonymous> (/export/home/test/protractor_test_2/node_modules/jasminewd2/index.js:94:19)
From asynchronous test:
Error
at Suite.<anonymous> (/export/home/test/protractor_test_2/todo-spec.js:2:3)
at Object.<anonymous> (/export/home/test/protractor_test_2/todo-spec.js:1:63)
at Module._compile (module.js:649:30)
at Object.Module._extensions..js (module.js:660:10)
at Module.load (module.js:561:32)
at tryModuleLoad (module.js:501:12)
1 spec, 1 failure
Finished in 0.159 seconds
[16:51:06] I/local - Shutting down selenium standalone server.
[16:51:06] I/launcher - 0 instance(s) of WebDriver still running
[16:51:06] I/launcher - firefox #01 failed 1 test(s)
[16:51:06] I/launcher - overall: 1 failed spec(s)
[16:51:06] E/launcher - Process exited with error code 1
Any help would be appreciated.
This error message...
Failed: Browsing context has been discarded
...implies that the communication between GeckoDriver and Marionette was broken.
Some more information regarding the GeckoDriver binary version would have given us some clues about whats wrong happening. However this issue can happen due to multiple factors as follows:
As per Hang when navigation request removes the current browsing context if you have used driver.navigate().back(); when Selenium's focus was within an <iframe> this error is observed.
As per Crash during command execution results in "Internal Server Error: Failed to decode response from marionette" this issue can also occur due to ctypes checks for NULL pointer derefs.
You can find the Selenium testcase here. Perhaps instead of panicking, it would have been better to handle this more gracefully by clearing any state and returning geckodriver to accept new connections again.
As per Failed to decode response from marionette - Error to open Webdriver using python this issue can also occur if you are not using the complient version of the binaries.
This usecase
The root cause of this issue seems to be MemoryUsage. As per Intermittent awsy\test_memory_usage.py TestMemoryUsage.test_open_tabs | NoSuchWindowException: Browsing context has been discarded which is intermittent in nature. This issue was once marked as RESOLVED then again REOPENED.
As #Madhan mentioned while working with AngularJS applications and Protractor always include:
waitForAngularEnabled(true);
Finally, as per best practices while working with GeckoDriver, Selenium and Firefox Browser follow the below compatibility chart:
Supported platforms
Was able to fix this issue with below configuration.
- Protractor: v5.4.1
- Selenium JAR driver: selenium-server-standalone-3.141.59.jar
- geckodriver:geckodriver-v0.20.0-linux64
Also we need to give path of geckodrvier in protractor conf file.
geckoDriver: 'node_modules/protractor/node_modules/webdriver-manager/selenium/geckodriver-v0.20.0'
By default webdriver-manager will download latest version of geckodriver which is 0.24.0. But the needed geckdriver is v0.20.0, so I downloaded this manually and placed it inside node_modules/protractor/node_modules/webdriver-manager/selenium/ directory.
Hope this helps to people facing similar issue.
My protractor scripts are highly stable on chrome browser but the same scripts throws below mentioned for 20% of the test cases.
Failed: JavaScript error (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 100 milliseconds
Build info: version: '3.3.1', revision: '5234b32', time: '2017-03-10 09:04:52 -0800'
System info: host: 'LAPTOP-RNQ2JQBE', ip: '192.168.89.115', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_121'
Driver info: org.openqa.selenium.ie.InternetExplorerDriver
Capabilities [{browserAttachTimeout=0, ie.enableFullPageScreenshot=true, enablePersistentHover=true, ie.forceCreateProcessApi=false, ie.forceShellWindowsApi=false, pageLoadStrategy=normal, ignoreZoomSetting=true, ie.fileUploadDialogTimeout=3000, version=11, platform=WINDOWS, nativeEvents=true, ie.ensureCleanSession=false, elementScrollBehavior=0, ie.browserCommandLineSwitches=, requireWindowFocus=false, browserName=internet explorer, initialBrowserUrl=http://localhost:41897/, javascriptEnabled=true, ignoreProtectedModeSettings=false, enableElementCacheCleanup=true, unexpectedAlertBehaviour=dismiss}]
Session ID: f32d0eb8-65d9-4161-9535-da5cde8b9a6c
Failed: Error while waiting for Protractor to sync with the page:
"Unable to get property '$$testability' of undefined or null
reference"
I am trying to run test on Safari browser, it is working when run selenium server with selenium "selenium-server-standalone-2.47.1.jar" it working fine.
I have downloaded and installed safari webdriver driver extension.
Using Safari browser: 5.1.7 on window machine.
I added browser configuration in conf file:
'browserName': 'safari'"
When I am running server with
webdriver-manager start
Getting below exception and safari browser not launched.
:\Users\Admin\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-
webdriver\error.js:27
super(opt_error);
^
WebDriverError: The best matching driver provider org.openqa.selenium.ie.InternetExplorerDriver can't create a new driver instance for Capabilities [{count=1, browserName=safari}]
Build info: version: '2.52.0', revision: '4c2593c', time: '2016-02-11 19:06:42'
System info: host: 'Admin-PC', ip: '10.253.10.4', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.8.0_65'
Driver info: driver.version: unknown at WebDriverError C:\Users\Admin\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\error.js:27:10)
at Object.checkLegacyResponse (C:\Users\Admin\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\error.js:580:13)
at C:\Users\Admin\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver.js:64:13
at Promise.invokeCallback_ (C:\Users\Admin\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:1329:14)
at TaskQueue.execute_ (C:\Users\Admin\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2790:14)
at TaskQueue.executeNext_ (C:\Users\Admin\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2773:21)
at C:\Users\Admin\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2652:27
at C:\Users\Admin\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:639:7 at process._tickCallback (node.js:369:9)From: Task: WebDriver.createSession()
at acquireSession (C:\Users\Admin\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver.js:62:22)
at Function.createSession (C:\Users\Admin\AppData\Roaming\npm\node_modules\protractor\node_modules\seleniu-webdriver\lib\webdriver.js:295:12) at Builder.build (C:\Users\Admin\AppData\R oaming\npm\node_modules\protractor\node_modules\selenium-webdriver\builder.js:458:24)
at [object Object].DriverProvider.getNewDriver (C:\Users\Admin\AppData\Roaming\npm\node_modules\protractor\built\driverProviders\driverProvider.js:42:27)
at [object Object].Runner.createBrowser (C:\Users\Admin\AppData\Roaming\npm\node_modules\protractor\built\runner.js:203:37)
at C:\Users\Admin\AppData\Roaming\npm\node_modules\protractor\built\runner.js:293:21
at _fulfilled (C:\Users\Admin\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:834:54)
at self.promiseDispatch.done (C:\Users\Admin\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:863:30)
at Promise.promise.promiseDispatch (C:\Users\Admin\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:796:13)
at C:\Users\Admin\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:556:49
Let me know what I am missing.
I belive you should use like this
multiCapabilities: [{
name: 'ChromeIphone',
logName: 'Chrome Iphone',
browserName: 'chrome',
chromeOptions: {
'args': ['user-agent=Mozilla/5.0 (iPhone; CPU iPhone OS 8_0_2 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12A405 Safari/600.1.4']
},
mobileEmulationEnabled: true
}]
in your conf.js file cause protractor works on windows machine with chromium and you have to set user-agent parameter to show that your go to your page through safari browser. So you are not able to run Safari browser directly on windows machine only through chrome driver.
One of my E2E Test is failing only on Safari browser, when trying to send Text to an inputBox.
element(by.css('#content')).clear();
element(by.css('#content')).sendKeys("%20%DCben%20von%20Xylophonmusik%20qu%E4lt%20jeden%20gr%F6%DFeren%20Zwerg%20El%20ping%FCino%20Wenceslao%20hizo%20kil%F3metros%20bajo%20exhaustiva%20ll"); //UTF Text
Seeing following error in Webdriver manager console
18:40:12.150 INFO - Executing: [send keys: 16 [[SafariDriver: safari
on MAC (null)] -> css selector: #contentText],
[Falsches%20%DCben%20von%20Xylophonmusik%20qu%E4lt%20jeden%20gr%F6%DFeren%20Zwerg%20El%20ping%FCino%20Wenceslao%20hizo%20kil%F3metros%20bajo%20exhaustiva%20lluvia%20y%20%0A%200c%F4t%E9%20de%20l%27alc%F4ve%20ovo%EFde%2C%20o%F9%20les%20b%FBche%u0E40%u18:40:42.663
WARN - Exception thrown org.openqa.selenium.TimeoutException: Timed
out awaiting response to command "sendKeysToElement" after 30004 ms
(WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 30.02 seconds Build info: version:
'2.45.0', revision: '5017cb8', time: '2015-02-26 23:59:50' System
info: host: 'vq-mac-dt-036.local', ip: '10.21.134.62', os.name: 'Mac
OS X', os.arch: 'x86_64', os.version: '10.9.5', java.version:
'1.8.0_31' Driver info: org.openqa.selenium.safari.SafariDriver
Capabilities [{browserName=safari, takesScreenshot=true,
javascriptEnabled=true, version=7.0.6, cssSelectorsEnabled=true,
platform=MAC, secureSsl=true}] Session ID: null at
sun.reflect.GeneratedConstructorAccessor57.newInstance(Unknown Source)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
at org.openqa.selenium.remote.ErrorHandler.createThrowa18:40:42.664
WARN - Exception: Timed out awaiting response to command
"sendKeysToElement" after 30004 ms (WARNING: The server did not
provide any stacktrace information) Command duration or timeout: 30.02
seconds
This test is working in Firefox, Chrome Browsers. I can't find any open issue related to safari driver.
Could you please advise, how to resolve this.
Thanks in advance.
Try chaining the clear, click and sendKeys functions on the input box to send the value. I don't think the UTF8 text should cause any problem. Here's how to do it -
var ele = element(by.css('#content'));
ele.clear().then(function(){
ele.click().then(function(){
ele.sendKeys("%20%DCben%20von%20Xylophonmusik%20qu%E4lt%20jeden%20gr%F6%DFeren%20Zwerg%20El%20ping%FCino%20Wenceslao%20hizo%20kil%F3metros%20bajo%20exhaustiva%20ll"); //UTF Text
});
});
Hope this helps.
The errors I get from shippable looks like this
Failures:
1) homepage should have the name of the app in the navbar
Message:
Error: Error while running testForAngular: Timed out waiting for async script result after 11002ms
Command duration or timeout: 11.13 seconds
Build info: version: '2.40.0', revision: 'fbe29a9', time: '2014-02-19 20:54:28'
System info: host: '61185b2d1026', ip: '172.17.18.4', os.name: 'Linux', os.arch: 'amd64', os.version: '3.13.0-32-generic', java.version: '1.7.0_67'
Session ID: 71602336-8ec6-44bd-a755-9fc82da1d337
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{platform=LINUX, acceptSslCerts=true, javascriptEnabled=true, cssSelectorsEnabled=true, databaseEnabled=true, browserName=firefox, handlesAlerts=true, browserConnectionEnabled=true, webStorageEnabled=true, nativeEvents=false, rotatable=false, locationContextEnabled=true, applicationCacheEnabled=true, takesScreenshot=true, version=29.0}]
Stacktrace:
Error: Error while running testForAngular: Timed out waiting for async script result after 11002ms
Command duration or timeout: 11.13 seconds
Build info: version: '2.40.0', revision: 'fbe29a9', time: '2014-02-19 20:54:28'
System info: host: '61185b2d1026', ip: '172.17.18.4', os.name: 'Linux', os.arch: 'amd64', os.version: '3.13.0-32-generic', java.version: '1.7.0_67'
Session ID: 71602336-8ec6-44bd-a755-9fc82da1d337
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{platform=LINUX, acceptSslCerts=true, javascriptEnabled=true, cssSelectorsEnabled=true, databaseEnabled=true, browserName=firefox, handlesAlerts=true, browserConnectionEnabled=true, webStorageEnabled=true, nativeEvents=false, rotatable=false, locationContextEnabled=true, applicationCacheEnabled=true, takesScreenshot=true, version=29.0}]
at Error ()
==== async task ====
WebDriver.executeScript()
at [object Object]. (/home/shippable/workspace/src/github.com/tipfortip/www/public/index-spec.js:4:13)
==== async task ====
Asynchronous test function: it()
Error
at [object Object]. (/home/shippable/workspace/src/github.com/tipfortip/www/public/index-spec.js:3:3)
at Object. (/home/shippable/workspace/src/github.com/tipfortip/www/public/index-spec.js:1:63)
2) homepage should have the name of the app in the footer
Message:
Error: Angular could not be found on the page http://localhost:8000/ : angular never provided resumeBootstrap
Stacktrace:
Error: Angular could not be found on the page http://localhost:8000/ : angular never provided resumeBootstrap
==== async task ====
WebDriver.executeScript()
at [object Object]. (/home/shippable/workspace/src/github.com/tipfortip/www/public/index-spec.js:14:13)
==== async task ====
Asynchronous test function: it()
Error
at [object Object]. (/home/shippable/workspace/src/github.com/tipfortip/www/public/index-spec.js:13:3)
at Object. (/home/shippable/workspace/src/github.com/tipfortip/www/public/index-spec.js:1:63)
I can run the tests successfully with Firefox and Chrome on my computer.
For some reason the Shippable system did not recognize the bootstrapping that my document was doing. Needed to add it in the HTML of the page that was resolving.
angular.element(document).ready -> angular.bootstrap document, ['foo']
did not work, needed
<!DOCTYPE html>
<html data-ng-app="foo">