-
Notifications
You must be signed in to change notification settings - Fork 2.3k
ptor.getCurrentUrl() is not working correct #57
Comments
Hello! |
Closing as there seem to be no further questions. Please reopen if something comes up! |
Hey @juliemr, I've changed my code a little bit:
application.com is my BaseUrl in conf.js. What's wrong with the code? Thank you |
I don't understand your last sentence, sorry. What is the URL that you are
|
I apologize, I should be more specific. I have baseURL in conf.js file, which is a basic sign up page. Basically what happens protractor doesn't wait until home page gets loaded, grabs baseURL and then my test fails. I hope it's more clear now. Thank you.A On Sep 12, 2013, at 8:59 PM, Julie Ralph notifications@github.com wrote:
|
Hi , I have fixed the issue using the following function to wait for the URL to change
} |
I've got a problem with IE10/IE11 that both returned URL without hash, whereas webkit returned with hash. Switched to a more cross-browser hack:
|
On ie11 browser.getCurrentUrl() does not return the current url, but the previous url. The hack from @tot-ra works. To be honest, all the APIs from protractor suck. |
@ctamas you don't understand the way protractor and js selenium api manages promises. I guess the way js selenium API or protractor manage promises has problems in synchronization, or it is a way that is not a good one to manage promises. |
@ctamas the point is that it is not clear when to resolve promises with then and when not, and selenium api communicates like there is no need to resolve promises with then, while there is this need as we are demonstrating in this thread. |
I think the confusion comes from this sentence
and from the fact that someone - not only me apparently - expects a different behavior from My fault I did not get the semantic of |
i am using the statement browser.get(URL); but the url is not launched, rather just the browser window is opened by the previous statement browser.manage().window().setSize(1600, 1000); is there any solution to this? |
Hello,
I've just started looking at protractor for our angularjs apps and looks very promising.
I want to use ptor.getCurrentUrl() to get url after login to make sure that I actually got logged in. My code looks something like this:
I'm using
to see what exactly gets stored and in console I see following result:
What am doing wrong in this case?
Thank you
The text was updated successfully, but these errors were encountered: