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

Failure when trying to change the page and currentURL cannot be converted to URI #492

Closed
savagekrosa opened this Issue Jun 29, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@savagekrosa
Copy link

savagekrosa commented Jun 29, 2017

I happened to encounter this issue when I tried to turn my tests from using separate Browser instance for each test to single browser instance for each suite. After one of the tests ends, several other tests fail with java.net.URISyntaxException. After investigating, it seems that URL in the browser generated by angular is not a valid url to convert to URI, so when calling:

browser.to MyPage

I receive the exception once it gets to the "Browser.go" method and it tries to convert currentUrl to URI:

currentUri = currentUrl ? new URI(currentUrl) : null -> this will throw java.net.URISyntaxException

I report this as an issue, because I believe the fact that currentURL cannot be converted to URI should not end in complete failure and instead "Browser.go" method should continue (as it does for NullPointerException)

@erdi

This comment has been minimized.

Copy link
Member

erdi commented Jun 30, 2017

Thanks for reporting.

Would you mind sharing what was the url that caused the issue? It will help me to understand it and hopefully come up with a better solution.

@savagekrosa

This comment has been minimized.

Copy link
Author

savagekrosa commented Jun 30, 2017

Hi

I didn't share url cause it is not a public url, however here is the format of url (replaced words with letters "abcd" and numbers with "1234", otherwise it is the same url):

http://abcd1234.abcd.abcd.com:1234/ab-cd/index.html#!/abcd#abcd-abcd-abcd-abcd

@erdi

This comment has been minimized.

Copy link
Member

erdi commented Jul 2, 2017

Thx @savagekrosa, I see what the problem is with the URL - using unescaped # inside of the fragment part is not allowed. Anyway, I will need to figure out a way to gracefully handle invalid urls in that particular part of the codebase.

@erdi erdi added this to the 1.2 milestone Oct 5, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.