Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getLocationAbsUrl on a non-angular page expects angular to exist #3097

Open
cnishina opened this issue Apr 6, 2016 · 2 comments
Open

getLocationAbsUrl on a non-angular page expects angular to exist #3097

cnishina opened this issue Apr 6, 2016 · 2 comments

Comments

@cnishina
Copy link
Member

cnishina commented Apr 6, 2016

Clicking on my "doge meme" link and testing to see the abs url should work. Instead receive error message: "Failed: unknown error: angular is not defined".

website:

<ul class="pet" id="pet_id">
  <li class="dog" id="dog_id" name="dog_name">wow such <a href="https://en.wikipedia.org/wiki/Doge_(meme)">Doge meme</a></li>
  <li class="cat" id="cat_id" name="cat_name">Cat</li>
</ul>

spec.js:

it('should be clicked', function() {
    browser.ignoreSynchronization = true;
    browser.get('http://localhost:8000/web.html');
    element(by.partialLinkText('Doge')).click();
    expect(browser.getLocationAbsUrl()).toBe('https://en.wikipedia.org/wiki/Doge_(meme)');
  });

repo:
https://github.com/cnishina/protractor-examples/tree/master/webdriver

@juliemr
Copy link
Member

juliemr commented Apr 7, 2016

This is a documentation fail for us.

getLocationAbsUrl is meaningless without Angular. It's intended as a supplement to getCurrentUrl when that doesn't work. (some IE situations)

Maybe we should rename it to something more useful, or make it very clear in the documentation that it doesn't work for other pages.

@juliemr juliemr changed the title Navigation to a non angular page expects angular to exist getLocationAbsUrl on a non-angular page expects angular to exist Apr 7, 2016
@juliemr
Copy link
Member

juliemr commented Apr 26, 2016

We should fix this and the docs for #3007 at the same time - related issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants