browserName always IE when waitForAngualrEnabled(false)
See original GitHub issueBug report
- Node Version:
v6.11.5
- Protractor Version:
5.3.0
- Angular Version:
1
- Browser(s):
all
- Operating System and Version
Win10 1709
exports.config = {
framework: 'jasmine2',
allScriptsTimeout: 50000,
untrackOutstandingTimeouts: true,
// Capabilities to be passed to the webdriver instance.
capabilities: {
name: 'QA Protractor Automation',
browserName: 'chrome',
},
params: {
build: 'daily',
},
localSeleniumStandaloneOpts: {
jvmArgs: ['-Dwebdriver.ie.driver=./node_modules/webdriver-manager/selenium/IEDriverServer3.11.1.exe', '-Dwebdriver.edge.driver=./node_modules/webdriver-manager/selenium/MicrosoftWebDriver.exe'],
},
beforeEach: function () {
browser.executeScript('window.e2e = true;')
},
onPrepare: function () {
// onPrepare browser config
browser.driver.manage().window().maximize();
browser.manage().timeouts().implicitlyWait(0);
browser.getProcessedConfig().then(function (c) {
if (c.capabilities.browserName == "internet explorer")
browser.waitForAngularEnabled(false);
})
browser.executeScript('window.e2e = true;');
browser.waitForAngularEnabled(false);
browser.get('https://angular.io/');
//use either or
browser.driver.get('https://angular.io/');
},
// Spec patterns are relative to the configuration file location passed
// to protractor (in this example conf.js).
// They may include glob patterns.*/
specs: ['./specs/fireFoxSmokeTest.js'],
// Options to be passed to Jasmine-node.
jasmineNodeOpts: {
showColors: true, // Use colors in the command line report.
defaultTimeoutInterval: 9000000,
}
}
simple test to recreate
//login does not have Angular Component
it('should be chrome', function () {
//disable waitForAngular for login page
browser.getProcessedConfig().then(function (c) {
console.log(c.capabilities.browserName)
})
});
**console output from test**
[17:19:38] I/launcher - Running 1 instances of WebDriver
[17:19:38] I/local - Starting selenium standalone server...
[17:19:40] I/local - Selenium standalone server started at http://172.28.102.81:51936/wd/hub
C:\Users\LeoColeman\Desktop\Version-7-Issue-Tracker\specs\Page Objects
Started
internet explorer
**- Steps to reproduce the bug**
1. either browser.driver.get() or disabled waitforAngualrenabled()
2. getProcessedConfig then console.log(browserName)
3. it will always come back as IE when accessing from browser.driver or when disabled browser.waitForAngular().
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Why do I need to use waitForAngular(false) & browser.sleep ...
This is why I always run tests with browser.waitForAngularEnabled(false) , but it's super difficult to handle wait.
Read more >Automating Angular application using Protractor on IE Browser
When this is set to False, the rest of the driver session, Protractor will not sync the Angular calls unless Angular wait is...
Read more >angular/protractor - Gitter
Is there a way to get the current browser.waitForAngularEnabled() setting? When called, it sets it to true/false. But is there a way ...
Read more >Automated Cross Browser Testing With Protractor & Selenium
waitForAngularEnabled (false);” ... waitForAngularEnabled(false); ... There are always challenges and limitation to run your test with ...
Read more >Protractor - Quick Guide - Tutorialspoint
It is always a good practice to write the test because it makes the code better; ... in the same directory i.e. node_modules/Protractor/example....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks, @wswebcreation .
Take a look at my modification of your example:
and small-example-get-config.js
As you can see on screen, all works as expected.