Frameworkium / frameworkium-core

Framework for writing maintainable Selenium and REST API tests in Java.
https://frameworkium.github.io/
Apache License 2.0
160 stars 82 forks source link

[Appium Remote] 400 The plain HTTP request was sent to HTTPS port #108

Closed asharma88 closed 6 years ago

asharma88 commented 6 years ago

Hello,

I seem to be getting the following error when I try and create a Custom Browser Implementation.

[ERROR] Tests run: 2, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 4.05 s <<< FAILURE! - in TestSuite [ERROR] instantiateDriverObject(com.what3words.tests.MapTest) Time elapsed: 3.744 s <<< FAILURE! org.openqa.selenium.WebDriverException: Unable to parse remote response:

400 The plain HTTP request was sent to HTTPS port

400 Bad Request

The plain HTTP request was sent to HTTPS port

nginx/1.12.1

I tried to look online for solutions to this problem without luck. Please could you help me out explaining when I create a simple class with a main object and I instantiate my driver etc it has no issues with the ssl problem??

CustomDriverImpl source -> https://pastebin.com/JTJsTB4r

Thanks Arjun

ham1 commented 6 years ago

Line 37, try changing https to http.

I guess this due this part of the error message:

The plain HTTP request was sent to HTTPS port

Maybe check the kobiton docs on how to connect.

asharma88 commented 6 years ago

I have tried this Graham, unfortunately the endpoint from the service I'm using is HTTPS based.. do you know / think of any reason why frameworkium could mess with the appium connectivity?

https://github.com/kobiton/samples/blob/master/java/java_testng_junit/src/main/java/kobiton/com/testng/iOSWebTest.java

Configs -> https://github.com/kobiton/samples/blob/master/java/java_testng_junit/src/main/java/kobiton/com/configs/Configs.java

Br, Arjun Sharma

asharma88 commented 6 years ago

So turns out, I just need to use RemoteWebDriver the same as used in Saucelabs :)