Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
chenscottus opened this issue Mar 27, 2023 · 0 comments
Open

Comments

@chenscottus
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant