Angular could not be found on the page

75 views
Skip to first unread message

Ben

unread,
Mar 7, 2016, 9:28:49 PM3/7/16
to Selenium Users
Hi,

I'm trying to run protractor tests using the jasmine framework on a docker node chrome through a docker selenium hub.  I can run the tests just fine outside of docker, but when run inside docker I'm getting the "angular could not be found on the page" error.

I've tried to simplify the tests as much as possible, here it is:

// this test always passes
// purposefully not waiting for angular to confirm proxy settings are working

    it('should just get the page', function() {

        var driver = browser.driver;


        driver.get('https://angularjs.org/');

        driver.findElement(by.tagName('body')).getText().then(function(text) {

            expect(text).not.toBe(null);

        });

    });


// this test passes outside of docker, but gets the angular could not be found on the page error when run inside docker

    it('should get the index page', function() {

        console.log("Getting index.html");


        browser.get('https://angularjs.org/');

        expect(browser.getCurrentUrl()).toBe('https://angularjs.org/');

    });


Here is my config:

seleniumAddress: 'http://hub:4444/wd/hub',


    //directConnect: true,


    // Capabilities to be passed to the webdriver instance.

    capabilities: {

        'browserName': 'chrome',

        'defaultTimeoutInterval': 360000,


        'proxy': {

            'proxyType': 'manual',

            'httpProxy': 'http://localhost:3128',

            'sslProxy': 'http://localhost:3128',

            'noProxy': 'www-local.company.com, localhost, 127.0.0.1'

        }

    },


    rootElement: 'html',



    restartBrowserBetweenTests: true,

    framework: 'jasmine2',


    // Spec patterns are relative to the current working directly when

    // protractor is called.

    specs: ['specs/login*'],



    // Options to be passed to Jasmine-node.

    jasmineNodeOpts: {

        showColors: true,

        defaultTimeoutInterval: 30000,

        isVerbose : true,

        includeStackTrace : true

    }



Any assistance would be greatly appreciated.

Nick

unread,
Jun 16, 2017, 5:13:43 PM6/16/17
to Selenium Users
I'm getting the same thing, it started happening when I pulled a new docker, I think 3.4 with driver 2.3
Reply all
Reply to author
Forward
0 new messages