I can't find any information on if you can use selenium with C. Just C, not c#. Does anyone know if this is possible?
I tried searching on Google but all results that appear has "C#" in it and not "C".
From the official page of Selenium:
However as per Selenium Official Home Page language bindings for other languages does exist but those projects are not supported, maintained, hosted, or endorsed by the Selenium project, which are as follows:
You could always write your WebDriver based tests in any of the core language e.g. Java/Python/C# and call the script from your C / C++ application.
Webdriver++ is a C++ client library for Selenium Webdriver which you have to install and have the following feature support:
An example:
#include <webdriverxx/webdriverxx.h>
using namespace webdriverxx;
int main() {
WebDriver firefox = Start(Firefox());
firefox
.Navigate("http://google.com")
.FindElement(ByCss("input[name=q]"))
.SendKeys("Hello, world!")
.Submit();
return 0;
}
@JimEvans in his comment clearly mentions:
If you really don't care that you're not running in a "real" browser, then directly consuming QtWebKit might be a good choice. Realize, though that it's not a trivial undertaking. There aren't any C++ language bindings for WebDriver, as far as I know, but as long as you have a JSON parsing library (json-cpp is pretty good), and an HTTP client library, you can write your own language bindings in pretty short order.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With