C++: First Program

Here is the first program that I have wrote . #include<iostream> int main() { int age; std::cout<<“What is your age”; std::cin>>age; std::cout << “Your age is “<< age; return 0; } <iostream> is the input output library ,without which we can not do input and output operation in the c++; #include is a processor directive…

How to use Class Name in Selenium

I have copied the following piece of HTML from https://en.wikipedia.org/wiki/Carnegie_Mellon_University The class=”mw-logo-tagline” indicates a text near the logo of Wikipedia .If we click on the text then it will redirect us to the Home page.Here we will automate this process by class name locator. First open  the url using the get() method as below. driver.get(“https://en.wikipedia.org/wiki/Carnegie_Mellon_University”); The…

How to use Name locator in selenium.

The following html snippet has been taken from the following  link (you can inspect it there in the page) https://en.wikipedia.org/wiki/Main_Page It indicates one search box, where we can write something for the same purpose.Here  you can see the locator is Name and its given as this-  name=”search” The syntax to identify the Name locator using…

Example of ID and usage in the Selenium.

For example I have copied the following pieces of HTML from the https://www.wikipedia.org .The anchor element <a> along with the id=”js-link-box-ru” indicates one link .As from the title it says that it will redirect you to the Russian version of wikipedia. To click on the link using the id locator we can use the following…

Different locators in Selenium.

To automate the web application, such as automatically clicking on the buttons and links ,writing data to a text-box etc we need to first identify the web elements of those buttons or text-boxes and then perform the operation. We can identify those web elements using locators. Selenium web-driver can use the following locators to identify…