The page object that I have is the result of a long chain of calls click()(in case you are wondering how I could have a page object without knowing the URLs used to get it).
click()
HtmlPage.getDocumentURI
HtmlPage.getOwnerDocument
page.executeJavaScript("return document.location").getJavaScriptResult()
Any clues?
The answer, of course, is what you executeJavaScriptshould name evalJavaScriptand write something like
executeJavaScript
evalJavaScript
page.executeJavaScript("document.location").getJavaScriptResult()
page.getUrl()
worked great for me.
Source: https://habr.com/ru/post/1790472/More articles:java JIT - what kind of optimizations are possible? - javaNHibernate PreSelect? - c #NSNumberFormatter Error from Apple Documentation "Data Formatting Guide" - iosIn Android test, how to check that view is displayed? - androidMany InfoWindow markers in Google Maps v3 - google-maps-api-3the unmanaged dependency of a dll dll on C ++ is not copied to the application folder, and another managed dll is visual-studioAdding HTTPHandler using SPWebConfigModification - sharepointWindsor Castle - Injection of Value - c #Silverlight UI Thread Freezing - ui-threadСелектор jquery на textarea и текстовое поле - jqueryAll Articles