Collections:
getCurrentUrl() Failed on WebDriver Java API for Edge
Why getCurrentUrl() method is not returning the correct URL with Edge WebDriver?
✍: FYIcenter.com
If you are using the Edge WebDriver MicrosoftWebDriver.exe,
you may notice that the getCurrentUrl() method fails to return
the correct URL after a Web form is submitted by calling sendKeys()
as shown below:
1. Run the same test program, FormSubmit.java, as shown in the last tutorial with Edge WebDriver:
C:\fyicenter> java -classpath .;\fyicenter\selenium\java\client-combined-3.141.59.jar;\ .;\fyicenter\selenium\java\client-combined-3.141.59.jar;\ \fyicenter\selenium\java\libs\guava-25.0-jre.jar;\ \fyicenter\selenium\java\libs\okhttp-3.11.0.jar;\ \fyicenter\selenium\java\libs\okio-1.14.0.jar;\ \fyicenter\selenium\java\libs\commons-exec-1.3.jar \ FormSubmit Edge [13:46:14.744] - Listening on http://localhost:19714/ 1:46:16 PM org.openqa.selenium.remote.ProtocolHandshake createSession INFO: Detected dialect: OSS Test Case - Submit a search: Actual Value: http://sqa.fyicenter.com/ Expected Value: ..Q=selenium... Test Result: Failed
Notice that the getCurrentUrl() did not return the correct URL that contains the query string after calling sendKeys().
2. Look at the Edge browser window, you see the correct URL,
http://sqa.fyicenter.com/index.php?Q=selenium.
This seems to be a bug in the Edge WebDriver.
Â
⇒ "Unable to determine type from: U" Error
⇠Load HTML Files with WebDriver in Java
⇑ Using Selenium WebDriver Client Java API
⇑⇑ Selenium Tutorials
2019-12-19, 1147👍, 0💬
Popular Posts:
How to turn on Chrome WebDriver logging with Selenium Python API? If you want to turn on logging on ...
How to turn on Chrome WebDriver logging with Selenium Python API? If you want to turn on logging on ...
Where to find online test tools? FYIcenter.com has prepared a number of online test tools: Data Look...
How to validate domain name format? In order to help your programming or testing tasks, FYIcenter.co...
Where to find tutorials on Apache JMeter test tool? I want to know how to use Apache JMeter. Here is...