webdriverxx icon indicating copy to clipboard operation
webdriverxx copied to clipboard

"driver.version: unknown" and "entry 0 of 'firstMatch' is invalid"

Open chenscottus opened this issue 1 year ago • 0 comments

Hello,

There are exceptions while running the sample code with selenium-server-4.8.1 and selenium-server-4.0.0..  While there is no exceptions from https://github.com/durdyev/webdriverxx . 
   java -jar selenium-server-4.8.1.jar standalone -p 4444 &
  java -jar selenium-server-4.0.0.jar standalone -p 4444 &

The selenium-server is attached.

Many thanks!

-Scott

============ Code:

#include <webdriverxx.h> #include <webdriverxx/browsers/chrome.h> using namespace webdriverxx;

int main(int argc, char** argv) {

WebDriver chrome = Start(Chrome());
chrome
	.Navigate("https://www.google.com")
	.FindElement(ByCss("input[name=q]"))
	.SendKeys("Hello, world!")
	.Submit();

std::cout << " Please input any key to exit ..." << std::endl;
std::cin.get();
return 0;

}

================ webdriverxx\src\include\webdriverxx\client.inl Line 56: const auto response = resource_->Post("session", //JsonObject() // //.Set("desiredCapabilities", firstMatch) // don't set this, for some reason it will fuck up. // .Set("capabilities", firstMatch) // .Set("requiredCapabilities", firstMatch) //); JsonObject() .Set("desiredCapabilities", static_castpicojson::value(desired)) .Set("requiredCapabilities", static_castpicojson::value(required)) );

client issue:

Unhandled exception at 0x00007FF8611DFE7C in webdriverxx_test.exe: Microsoft C++ exception: webdriverxx::WebDriverException at memory location 0x000000D8FBBBF060.

selenium-server_webdriverxx_log.txt

chenscottus avatar Mar 27 '23 20:03 chenscottus