"Unable to determine type from: U" Error

Q

Why I am getting the "Unable to determine type from: U" error when use the MicrosoftWebDriver.exe driver?

✍: FYIcenter.com

A

You are getting the "Unable to determine type from: U" error because of a known bug in the MicrosoftWebDriver.exe driver.

This bug will prevent you to launch multiple concurrent Selenium sessions as shown in this tutorial.

1. Run the FormSubmit.java in a command window, you see Edge browser showing up. It will stay there for about 1 minute.

C:\fyicenter> java -classpath \
   .;\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

...   
Test Case - Submit a search:
   Actual Value: http://sqa.fyicenter.com/
   Expected Value: ..Q=selenium...
   Test Result: Failed

2. Run the FormSubmit.java in another command window, while is the other Selenium session is still running, you see the following error:

C:\fyicenter> java -classpath \
   .;\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

Listening on http://localhost:14221/
Exception in thread "main" org.openqa.selenium.WebDriverException: 
   Unable to parse remote response: Unknown error
   at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:115)
   at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:74)
   at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:136)
   at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
   at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
   at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:213)
   at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:131)
   at org.openqa.selenium.edge.EdgeDriver.<init>(EdgeDriver.java:141)
   at org.openqa.selenium.edge.EdgeDriver.<init>(EdgeDriver.java:96)
   at EdgeTest.main(EdgeTest.java:5)
Caused by: org.openqa.selenium.json.JsonException: 
   Unable to determine type from: U. Last 1 characters read: U
Build info: version: '3.141.59', revision: 'e82be7d358', ...
System info: os.name: 'Windows 10', java.version: '12.0.1', ...
Driver info: driver.version: EdgeDriver
   at org.openqa.selenium.json.JsonInput.peek(JsonInput.java:122)
   at org.openqa.selenium.json.JsonTypeCoercer.lambda$null$6(JsonTypeCoercer.java:140)
   at org.openqa.selenium.json.JsonTypeCoercer.coerce(JsonTypeCoercer.java:126)
   at org.openqa.selenium.json.Json.toType(Json.java:69)
   at org.openqa.selenium.json.Json.toType(Json.java:55)
   at org.openqa.selenium.json.Json.toType(Json.java:50)
   at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:112)
   ...

This is known bug in the Edge WebDriver.

 

Starting with Selenium WebDriver Client Python API

getCurrentUrl() Failed on WebDriver Java API for Edge

Using Selenium WebDriver Client Java API

⇑⇑ Selenium Tutorials

2019-12-19, 5899🔥, 0💬