API Testing using Selenium Webdriver

82 views
Skip to first unread message

sachin bhangade

unread,
Jul 7, 2016, 5:45:45 AM7/7/16
to webdriver
Can I do API testing with Selenium Webdriver?
In my project I want to post query into database using curl/POSTMAN
then database will give some response which I have to verify against expected output.
Can I do this using selenium or Is there any other automation tool for this?
Thanks in advance.

Nikhil Bhoski

unread,
Jul 7, 2016, 6:14:06 AM7/7/16
to webd...@googlegroups.com

use rest assured

--
You received this message because you are subscribed to the Google Groups "webdriver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webdriver+...@googlegroups.com.
To post to this group, send email to webd...@googlegroups.com.
Visit this group at https://groups.google.com/group/webdriver.
For more options, visit https://groups.google.com/d/optout.

Suraj Ray

unread,
Jul 7, 2016, 6:25:45 AM7/7/16
to webd...@googlegroups.com
There are many third party utilities, rest-assured, apache httpClient, jersey-client, javaUrlConnection. Can use any of them.

darrell grainger

unread,
Jul 7, 2016, 8:36:21 AM7/7/16
to webdriver
As others suggest, there are other tools you should use to do API testing. Selenium WebDriver is a tool to automate web browser tests. NOT plugins for web browsers but actual websites in a web browser. If you aren't trying to automate a human testing a website then there are usually better tools to test with.

A quick Google of "API testing" and I do get a lot of useless suggestions. If the implementation is REST then maybe searching for "RESTful API testing" or if it is SOAP APIs then searching for "SOAP API testing" might give better results.

Personally, I like using http://www.mbtest.org/.

DT

unread,
Jul 13, 2016, 7:17:10 AM7/13/16
to webdriver
Theoretically yes, you can issue HTTP GET requests using "usual" WebDriver.get() method. For other request types you can use JavaScript Executor however it is better to go for special tools which provide better API testing functionalities, i.e. :

Reply all
Reply to author
Forward
0 new messages