I have lots of REST APIs to automate. I know that it can be automated using SOAPUI and Groovy/Javascript.
But I am looking for solution to automate APIs using Selenium webdriver and JAVA. I have already searched for similar solution but unable to find.
You can use Selenium webdriver only for browser automation. Webdriver is only for driving the browser like launch, close, maximize, minimize, screenshot the browser etc...during this automation if you need to test API you can send resquest to the required API from any one of the programming language like java, c#, javascript,etc... and you have to receive the response from the API. You have to test you get the expected response for the given resquest. Selenium webdriver is nothing to do with API testing.
Related
I want to verify API calls/json files that are generated at the time of performing action like save, edit from browser. We can see those API calls in Developers Tool of chrome browser under network Tab.
So I want to Test those API calls using Selenium. How can I achieve this ?
Thank you in Advance.
Selenium doesn't have a built in functionality for you to achieve that.
Basically, if you click the Save button from browser using Selenium, you could only get the requests and responses using a 3rd party library like the Fiddler API.
Another way for you to do that is to create the requests yourself using the HTTPRequest or HTTPResponse classes (these are in C#, probably that in Java they have a different but similar name).
And using a tool, I suggest doing it with JMeter, it's open source, can do it by himself or can be integrated with Selenium.
Another options, "Selenium based" would be to use a headless browser. I know that HTMLUnitDriver has this built in, not sure about PhantomJS or others.
At the moment, I use Firefox as browser for my Java Application with Selenium. But Firefox is slow.
Is it possible to use Yandex as browser? Didn't find anything in Google. Does Selenium supports Yandex? For Chrome I need the .exe for using Chrome as browser. Is this possible with Yandex?
From what I recall, there is no WebDriver for the Yandex ("Яндекс") browser. In other words, there is no way to automate this browser through selenium.
Also, there are some performance tips and further links here:
Selenium WebDriver works but SLOW (Java)
Yandex browser can work with Selenium WebDriver using Operadriver.
System.setProperty("webdriver.opera.driver", "C:\\Users\\User\\IdeaProjects\\testselenium\\drivers\\operadriver.exe");
OperaOptions options = new OperaOptions();
options.setBinary("C:\\Users\\User\\AppData\\Local\\Yandex\\YandexBrowser\\Application\\browser.exe");
WebDriver driver = new OperaDriver(options);
driver.get("https://docs.seleniumhq.org");
This might be what you are looking for ( 4 years later :) ):
https://github.com/yandex/YandexDriver
Is it possible to embed a Java app that has Selenium code lines into a web browser? Is this supported or not?
I have a Java application that uses Selenium API. I tried to use the init() method to embed the GUI window into a browser so that the application could be launched from a website, however it did not work. Is it supposed to be this way?
Technically you can because the selenium java client is just an java app that interacts with selenium grid in JsonWire protocol.
Take a look at this question Run selenium webdrivers from applet in HTML
No it does not. You cannot launch such an app from a web browser
I have a website which uses a Java applet. I am trying to automate it using Cucumber & Selenium WebDriver. However, every time I run the website in browser, I get a java security alert (see image), which should be explicitly allowed to proceed further.
Sample image - Java Security alert image
At present, I am unable to proceed beyond this step. Any help would be really appreciated.
I want to use selenium RC without TestCase, Junit or SeleneseTestCase.
I want to write a code which performs automation of my website. I don't want to use any Testing fromework link testCase or SeleneseTestCase.
I want just write a code and run my code without any testing Cases.
Is this possible?
You can try the Selenium Webdriver API http://seleniumhq.org/docs/03_webdriver.html.
It does not force you to use JUnit or the like. It simply starts a browser and executes your commands. You can still access page contents and examine them if you like.
Yes you can! :D
When I'm bored, I usually use Selenium to tweet on Twitter or post in Facebook. I'm still amaze in what Selenium can do. but in a way, we don't fully use the functionality of Selenium in doing so.
FYI you can do that in both Selenium RC and WebDriver :D