Reputation: 21
Can anyone give me the best solution for loading an angularJS page?
Because when I am trying to load a page on a browser I am facing an issue: It opens browser but doesn't load the site.
The URL I had given in my config file is
seleniumAddress: "http://127.0.0.1:4444/wd/hub",
baseUrl: "URL ",
and in Spec file it is as
browser.waitForAngularEnabled(true);
browser.driver.get("//URL");
Let me know of any best solution and any missing things in the code.
Upvotes: 0
Views: 432
Reputation: 1288
In the protractor.conf.js file, your baseUrl should be some valid URL for your application like
baseUrl: 'http://www.google.com'
And you navigate to pages like
browser.get('http://www.google.com');
or
browser.get(browser.baseUrl);
Or if you want to use the webdriver native function instead of protractor's, it would be
browser.driver.get('http://www.google.com');
Upvotes: 1