Angular could not be found on the page

classic Classic list List threaded Threaded
2 messages Options
Ben
Reply | Threaded
Open this post in threaded view
|

Angular could not be found on the page

Ben
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.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/ffacf1af-f244-4ddc-9005-2e27e7d16487%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Angular could not be found on the page

Nick-4
I'm getting the same thing, it started happening when I pulled a new docker, I think 3.4 with driver 2.3

On Monday, March 7, 2016 at 9:28:49 PM UTC-5, Ben wrote:
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('<a href="https://angularjs.org/&#39;" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fangularjs.org%2F\x27\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHLFnKCfPYOl8c_LpbkXn-4rEC5ug&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fangularjs.org%2F\x27\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHLFnKCfPYOl8c_LpbkXn-4rEC5ug&#39;;return true;">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('<a href="https://angularjs.org/&#39;" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fangularjs.org%2F\x27\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHLFnKCfPYOl8c_LpbkXn-4rEC5ug&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fangularjs.org%2F\x27\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHLFnKCfPYOl8c_LpbkXn-4rEC5ug&#39;;return true;">https://angularjs.org/');

        expect(browser.getCurrentUrl()).toBe('<a href="https://angularjs.org/&#39;" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fangularjs.org%2F\x27\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHLFnKCfPYOl8c_LpbkXn-4rEC5ug&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fangularjs.org%2F\x27\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHLFnKCfPYOl8c_LpbkXn-4rEC5ug&#39;;return true;">https://angularjs.org/');

    });


Here is my config:

seleniumAddress: '<a href="http://hub:4444/wd/hub" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fhub%3A4444%2Fwd%2Fhub\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEa7FiXHB-jhWDWCSA65vSaueqwbA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fhub%3A4444%2Fwd%2Fhub\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEa7FiXHB-jhWDWCSA65vSaueqwbA&#39;;return true;">http://hub:4444/wd/hub',


    //directConnect: true,


    // Capabilities to be passed to the webdriver instance.

    capabilities: {

        'browserName': 'chrome',

        'defaultTimeoutInterval': 360000,


        'proxy': {

            'proxyType': 'manual',

            'httpProxy': '<a href="http://localhost:3128/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Flocalhost%3A3128%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNESVaKJAyA_FhgPlPxJgE4zpPRVFg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Flocalhost%3A3128%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNESVaKJAyA_FhgPlPxJgE4zpPRVFg&#39;;return true;">http://localhost:3128',

            'sslProxy': '<a href="http://localhost:3128/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Flocalhost%3A3128%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNESVaKJAyA_FhgPlPxJgE4zpPRVFg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Flocalhost%3A3128%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNESVaKJAyA_FhgPlPxJgE4zpPRVFg&#39;;return true;">http://localhost:3128',

            'noProxy': '<a href="http://www-local.company.com" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww-local.company.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGE7mAqvjkl0cBqFRacAhKNanJONg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww-local.company.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGE7mAqvjkl0cBqFRacAhKNanJONg&#39;;return true;">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.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/9a13bd6c-ff5c-41f7-ba43-f5fd4ff12a13%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.