Blogs  

Selenium Resume – Building an Impressive Test Engineer Resume

How to Curate a Selenium Resume

You apply for a technical job that requires complete technical knowledge. We are here to take you to the end from the start. We teach you here how to curate a Selenium resume. In this article, we explain Selenium testing as a great career ahead for you. You can contact us for your Selenium training. We provide complete Selenium training for Selenium certification. Naresh I Technologies also is the number one computer training institute in Hyderabad and among the top five computer training institutes in India.

In this blog, you learn about automation test Engineers, job descriptions, automation test engineer roles, responsibilities, the skill set, Selenium job trends, trending salary details, what we should consider while writing a resume, and end up with a sample resume. 

Hence let's begin our learning and understand what an automation test Engineer is.

Selenium Resume: Understand what an Automation Test Engineer

When we develop software, we require testing to ensure it provides us the desired output. We can test an application differently. Test manually through a varied set of inputs, check the "output," and report finally. Or we can automate the process through the script. 

An automation tester writes the test script. And we use it to test the correctness of the application.

Automation testing requires the application of technology governing the production and ensuring timely delivery of the software products. Automated testing reduces the time required for performing complex tasks.

The test automation engineer performs designing, programming, deploying, and simulation of the automated test solutions. The objective of test automation is the automation with the least coding or the minimum scripts.

The Automation tester writes the test cased for script creation for checking the functionalities automatically. The Automated test is on the "pre-scripted test" running automatically for comparing the expected results and the actual results. Hence, an automation tester performs a lead role in making application defect free.

Let's have a look at the job description.

Automation Test Engineer Job Description:

We need to first look at the job description. And the job description for a majority of the companies includes the Selenium is a must-know skill.

A typical job description can be like this:

  1. "4 " years’ experience in Automation testing

  2. Can write Selenium test cases using Java.

  3. Prior experience in mobile application testing and web application testing

  4. Should be proficient in API test automation.

  5. 2+ years of experience in white box testing.

  6. can solve problems.

  7. Good communication skills

  8. Can work independently as well as in a team.

  9. The above job description varies with Organization requirements. Now, let's have a look at the responsibilities of the automation tester.

Roles and Responsibilities:

For becoming a successful automation tester, you need the following as your skillset.

  1. Positive attitude towards problem-solving.

  2. Find and correct the system bugs.

  3. Come up with proper test strategies.

  4. Write and design the test automation scripts.

  5. Develop and design the test strategies non-functional and functional. 

  6. should be good at all type of testing

  7. Process, monitor, and implement the testing.

  8. Deliver test reports on time.

  9. Keep himself update with current skills.

However, the role of the automation tester is more than this. The job requirements hence vary based on what the organization requires.

Now, the roles and responsibilities are clear. We list the skills you require to become a prominent tester.

Skills required for Selenium Resume:

Skills are essential for clearing any interview. You need manual testing knowledge for understanding automation testing. It's a skill you need for a test Engineer career.

Below you will find the skillsets based on the experience level. First, you need to look for fresher skills.

  1. Basic knowledge of the test architecture

  2. Good knowledge of programming languages as well as software development

  3. Should know test frameworks

  4. Can write the test scripts

  5. Good at troubleshooting

  6. Must be creative

  7. Good communication skills

Now let us have a look at the experienced Automation test Engineer Skill Set:

  1. Must have 2-5 years of experience in software development

  2. Good practical knowledge of manual as well as automation testing

  3. Can build, manage, and lead product testing

  4. Good knowledge of Product lifecycle

  5. Should be innovative

  6. Good experience in both Linux and windows-based development

  7. Must-know business goals and know the specifications

Above is the skillset a company requires in you as a tester. It varies from company to company, however. 

And now you know the skills you need to clear any interview. Below we see the Selenium job trends, which is increasing almost exponentially in the last few years.

Selenium Resume: The Job Trends

Selenium is the most used automated testing tool. You can master it to make a career in the field of testing. You will find numerous organizations that offer jobs for roles, like test analyst, test engineer, QA analyst, test manager, and a lot more makes into this list. There is an exponential increase in the vacancies with high salaries guaranteed. 

You can opt for a permanent job as well as the contract jobs based on your preference. The median salary is around $60000. As a successful automation tester, it's the correct time to start working. 

Let's consider the salary trend of the Automation tester.

So, what are the salary trends:

Let's have the stats. How much an Automation Tester make annually?

The Selenium is the top-rated test automation tool. Now around 36% of people take this testing tool as their career. Hence an automation tester must master the Selenium. The average salary for them in India is from 4Lac INR to 15 Lacs INR. In the US, it is around $83000s annually. Hence, they are well paid.

Their value is increasing in the market. And, now let's consider the "basic factor." We need to keep this in mind while we write down the Selenium Resume.

Key issues 

For building a good resume, we need to consider few things in mind.

  1. The resume is the first impression on the recruiter's mind about you.

  2. There are two forms of resumes: Functional and Chronological.

    1. Functional: In this, you mention the most relevant experience based on the skills required first. It is the simplest way to portray yourself in front of the recruiter. 

    2. Chronological: This is the more traditional style of writing a resume where you mention all the projects with details based on your timeline.

  3. Make sure that your resume is simple, easy to understand, and most recent.

  4. Your message should not confuse anybody.

  5. For people with experience of fewer than "8" years, we require a single-page resume.

  6. Give top priority to the relevant skills.

  7. Make sure to mention achievements and hobbies as it helps in bring to your front the recruiter.

Now let's move towards the essential part of the article. And find out how we can write a resume as a selenium tester.

  1. Mention your full name, current designation, introduction, education, skills, achievement, and hobbies. 

  2. Make sure your paper is aligned. Your introduction should be simple and up to the mark.

  3. Mention your education details in full and mention all the projects you worked on in the past.

  4. Never worry if you are a fresher. Justify that you fit into the role through projects and skills.

  5. In case you are experienced. Quote your latest job role and the project you worked, as well as your achievements

  6. Mention your technical skills and brief at what you are very good. 

  7. Also, mention your hobbies and accomplishments, and be brief as it distracts the recruiter. Hence, be simple.

That complete this tutorial. I hope you now know how to curate a Selenium resume. 

You can contact Naresh I Technologies for your Selenium online training. We provide Selenium training in Hyderabad and USA, and in fact, you can contact us from any part of the world through our phone or online form on our site. Just fill it and submit it, and one of our customer care executives will be contacting you. And what else you get:

  • You have the freedom to choose from Selenium online training and classroom training.

  • Chance to study from one of the best faculties and one of the best Selenium training institutes in India

  • Nominal fee affordable for all

  • Complete training 

  • You get training for tackling all the nitty-gritty of Selenium.

  • Both theoretical and practical training.

  • And a lot more is waiting for you.

You can contact us anytime for your Selenium training and from any part of the world. Naresh I Technologies caters to one of the best Selenium training in India.

To attain excellence, you need testing and how good it be if testing is automated. All know, it is boring. However, scriptwriting is essential. And only then we automate the testing. That is why Selenium is in demand, and its popularity is moving upward. Book a seat for you now. Contact us anytime.

 

Top 50 Interview Questions in Selenium

We are so much dependent on the web. And we need to ensure the up-time as well as the functioning of the web apps. Anyways we need testing, and regularly. Selenium happens to be the automation testing tool developed for the testing. And in this blog, you will find various Selenium interview questions that you, as a fresher and experienced, get into the testing domain.

You can contact us for your Selenium Online training. We provide complete Selenium Online training. Naresh I Technologies also is the number one computer training institute in Hyderabad and among the top five computer training institutes in India.

Before we start discussing the questions, let's first brief that Manual testing is time-consuming and error-prone. And that is why we opt for the automation testing, and we need the Selenium automation testers.

If we put the technical questions apart, we get Selenium tricky interview questions. That proves we need the Selenium. It's since it is open-source, and we can adapt it. And that is why Selenium is the hero in the web testing arena. You will find that there have been more than 300 percent in the job posting in the past three years. The professionals from various domain companies are looking out for professionals that have the Selenium certification.

You need to learn the Java interview questions if you need to compete as a Selenium tester. So, let's begin our journey. 

The whole set of the Selenium questions is in three parts:

  • The first part is the Selenium basic interview questions meant for the freshers.
  • The Selenium interview questions for the experienced professionals:
  • You also learn the TestNG framework for Selenium.

Selenium Interview Questions the Basic Level:

1. Brief some of the advantages and the disadvantages of the Selenium. Compare it to the other testing tools such as the TestComplete and the QTP.

Differences are as below:

In Selenium, we do not need the License, though we need a license for the HT QTP and TestComplete. Selenium comes for free, though we need to pay for the HPQTP and TestComplete. Customer support wise, Selenium is weaker as it leverages us with only Open-Source community support. However, the other two provide the complete 24 x 7 support. Selenium requires very high coding skills, and the TestComplete also requires very high coding skills. You can use the Selenium in almost all the environments like Windows, Mac, and Linux. However, you can make use of the HPQTP in the Windows environment only. Whereas you can make use of the TestComplete in Windows 7, 2008, and later versions only.

2. What changes are in various Selenium versions?

The Selenium v3 comprises IDE, Grid, and the WebDriver, and the latest version is the Selenium 4. As the WebDriver got introduced, the Selenium RC was deprecated, and we do not use it since then. The "Selenium WebDriver" got introduced in the "Selenium v2." And, there was no "WebDriver" in Selenium v1. The Selenium v1 has three suites of tools: The Selenium IDE, Selenium Grid, and Selenium RC.

We use the IDE for recording and tests playback. And the WebDriver is used for dynamic web applications tests through the programming interface, and we use the Grid for deploying the tests on the remote host machines.

3. What are various exceptions that you find in the Selenium WebDriver?

Various Exceptions in the Selenium are much like the exceptions in different programming languages. And the most common "exceptions" in the Selenium are:

  • TimeOutException:  If a command does not complete in a set time, then this exception is thrown.

  • ElementNotVisible:  This throws when an element is not visible on the Web Page, but it is present in DOM.

NoSuchElementException: Suppose an element with a provided attribute is not on the web page, then this exception is thrown.

4. What is Selenium is exception test?

An exception tests the expected exception, which throws within the test class. If you write the test case that way, use @test annotation and brief which exception you want through a mention in the parameters. You need to have a look at the example here. @Test(exceptedException =NoSuchElementException.class).

You need to keep in mind the syntax used above.

StateElementException: If the element gets deleted or no longer attached with the DOM, this exception throws.

5. Why and how we make use of the Excel Sheet in the project?

Mention that you use it as a data source for the tests. You can make use of the excel sheet for data set storage while we perform the DataDriven testing. We have two main reasons for doing so.

While using it as a data source, we store the application URL for each of the environments, need testing as a testing environment, QA environment, and development environment or the environment for staging or pre-production or production environment. You can also store the access credentials for these environments, and on the requirement, you can decode them rather than leaving them unprotected and "plain." Also, we can execute the test cases by listing the whole test case in one column. And in the next column, we can mention yes or No. That indicates whether we want the test case to run or not.

While applying the "excel sheet" for the "DataDriven test," we can store the data for each of the iterations performed for the tests. Like when we test a "web page," we have various sets of input. We pass them through the text
box, and we can store them in the excel sheet.


6.  What do you know about POM or the page object model? Can you mention some of the advantages?

It happens to be a design pattern for making an object repository for the web UI elements. And each of these web pages of the application has its page class. It finds the WebEleements on that page and then executes the operations over the WebElements.

Various advantages are:

  • It caters to different operations and the "flows in the UI" starting from verification, which improves the "readability of the code."

  • The "object repositor" is not dependent on test cases. We can make use of it in multiple tests.

  • Above all, we can reuse the code.


8. What do you know about the Page Factory?

Through the Page Factory, we can implement the POM in an optimized manner. And by optimized, we mean that memory usage is "great," and the implementation is in an "object-oriented manner." In POM implementation, we need no package or "cache memory"  if we use the page factory. And we make use of @By(). However, if we do POM implementation without the "Page factory," we need the "page factory package." And, the cache lookup is faster. And we make use of @FindBy().

We use Page Factory for "initialization of the Page Object," or we do the instantiation of the Page Object by ourselves. We can also make the "annotation of the elements" since the describing properties are not all the time informative enough for differentiating an object from others.

We also separate the POM and the Test Methods. We make use of the @FindBy for finding the WebElement and the initElements method for initializing the web element from the class "Page Factory."

@FindBy takes in tagName, partialLinkText, id, name, css, linkText, xpath and className as attributes.

We have various forms of WAIT statements in the Selenium WebDriver. Can you brief about them? Or you can be asked how you ensure WebDriver synchronization?


9. We have two kinds of wait statements, the "implicit Wait" and the second one is the "Explicit."

The first one makes the WebDriver wait for a while through polling the DOM. Once declared, it is accessible for the whole life of the WebDriver instance. Its value is 0 by default. And if you fix a lengthier default, then this behavior polls the DOM periodically based on driver implementation or the browser. You should know that different drivers come with a different set of drivers.

The Explicit makes the execution wait for a while unless a similar condition is leveraged. A few of such conditions attained are:

  • elementToBeSelected

  • elementToBeClickable

  • presenceOfElementLocated

They might ask to curate a code for waiting for a certain element to turn visible on the page. You require writing an alert appearance code.


10. Do you know the JavaScriptExecutor?

You need to state it as an interface that caters to a mechanism for executing the JavaScript via the Selenium WebDriver. It caters to us the "execute script" and executeAsyncScript" methods for running


11. Can you scroll to a specific element in Selenium?

For that, we use scrollIntoView(). You can mention the code as well, which we leave on you to find out. And that is because that will make you learn, and you will grasp the Selenium faster.


12. How can we manage the Keyboard as well as a mouse through Selenium?

We can certainly via the mouse and keyboard events through advanced user interactions API. It has the actions and the action classes required for executing such events. And most common out of them is click and hold (), drag and drop () and source. Target (). The first one, "without leaving the mouse position," clicks. The second one ensures "click" and at the same time hold at the source element location, moves. The third one takes the cursor to the target element location, and then it releases the mouse.


13. How many types of frameworks are there in Selenium? Brief them.

Various frameworks types are:

  • Keyword Driver Framework in which only the operations and the instructions curated in different files such as Excel, XML, CSV, or in some database table, and then 

  • Data-Driven Framework: -

When we have the whole test, data generated via external files such as CSV, Excel, some database table, or XML, and we know it as the Data-Driven framework.

  • Hybrid Framework: This is the combination of both mentioned above.

 

14. What do we use as the Data source for various frameworks?

Various file types used as Dataset are excel, text, CSV, and XML, etc.


15. What do you mean by Selenese?

It's a selenium command set used for testing the web application. Make use of Actions., Assertions and Accessors. The actions are for performing the operations. The assertions are checkpoints. And, the accessors stores a variable.


16. How POM and PageFactory are different?

POM represents the webpage and holds the functionalities. The Page Factory initializes the web elements in the POM while we initialize the created instance.


17. Can the Selenium take care of Windows Pop-Ups?

Selenium does not support it. We make use of the Alert for displaying the warning in the form of Popup.

Some methods through which achieved are Void dismiss (). We call it when we click in the alert box the cancel button.

 Accept() method is applied when the OK button clicks. The "sendKeys method" sends data to the alert box.


18. What happens to be the Robot class?

We control the mouse and keyboard devices through it. Some of its methods are the KeyPress(), KeyRelease(), MouseMove() and MousePress(). The meaning of these is self-understood. We leave it on you to find it and explain it in your own words.


19. Can we handle multiple windows?

The Window handle holds the unique identifier which stores the windows address. It is a pointer to the windows, and it returns a string value.

  • "get window handle()" gets for us the window handle of the present window.

  • "get window handles()" gets the same for an opened window.

Set: This sets the window handle in the string form.

Switch to: we can switch between the windows through this.

Action: we can execute actions on windows through this.


20. Explain listeners. 

It modifies the system behavior. We customize the reports and logs through it, and they are of two types. The first one is the WebDriver Listener, and the second one is the TestNG listener.


21. Explain Assert and Verify commands.

We compare the actual value of the application with the expected value. And you will not experience a halt in test execution for any value of Verify.


22. How we navigate a web page back and forth?

Suppose d is driver variable. Then we have d.manage.back, d.navigate.forward, d.navigate.to("url") and d.navigate.forward.

Advanced level questions:


23. How can we send the ALT/CONTROL/SHIFT key through Selenium WebDriver?

We hold on to the above keys and then tap on the other button for achieving such functionalities. Hence it's not sufficient to specify these functions alone.

For holding these keys when others get pressed, we need to define the two other methods, which are KeyDown(modifier_key) and in the same format keyUp

Modifier keys are like keys.ALT or similarly SHIFT and CONTROL.

The first perform the modifier key press, and it does not set free the modifier key. The subsequent interactions we assume on keypress.

Also, the second performs the "key release." We make use of both of these methods. We capture the "special function" of a specific key.

TestNG questions for Selenium:


24. Explain TestNG.

It's the Testing framework designed for simplifying the almost whole range of testing requirements right from "unit to integration testing."


25. Can you brief a few advantages of the TestNG?

It leverages us to execute the test methods parallelly. It also helps us in defining the dependencies among the test methods. It assigns the priorities to the test methods. It also supports the parameterized test cases through @Parameters annotation. Via the @DataProvider annotation, we perform data-driven testing. It provides the HTML detailed reports.


26. Brief various annotations in TestNG.

  • @AfterTest

  • @BeforeTest

  • @AfterClass

  • @BeforeClass

  • @AfterMethod

  • @BeforeMethod

  • @AfterSuite

  • @BeforeSuite

  • @AfterGroups

  • @Test

  • @BeforeGroups


27. Mention various testing.xml tags

Test, suite, methods, class, classes


28. Can you place the TestNG tags incorrect order?

Suite, test, classes, class, methods


29. How can you make and run the testing.xml?

In this framework, we create the testing.xml file for creating and handling more than one test class. And we configure our test run, set up the test dependencies, include or exclude the test, package, or "class," and set the priorities in the above file.


30. Explain the importance of the testing.xml file.

We make use of the "testing.xml" file in the "TestNG Selenium project" for configuring the "whole test suite" in one file. Few features are as below:

  • Through this, we can exclude or include the test methods and test group execution.

  • We pass the parameter to the test cases.

  • We leverage adding of add group dependencies.

  • Same thing for test case priorities

  • We also configure the test cases parallel execution.

  • We can parameterize the test cases.


31. How can we pass the parameters to the test cases via this file?

We can declare In this XML file the parameters, and then we can reference the parameters within the source files. Then we can make a java test class known as ParamTest.java and then add the test methods like parameterizedTest() to this class. We provide a string as an input parameter to the "method." And then, we add the annotation @Parameter(: browser") to this particular method. 


32. What is TestNG Assert and write down some of them.

It helps in verifying the test conditions during the test run. Depending on the TestNG assertion, we consider the successful test only when it completes without any exception the test run.

Some of the assertions which are supported by the TestNG are as below:

  • assertEquals(actual, expected)

  • assertEqual( actual, expected, mesg)

And we have assertEqual for the Boolean, and similar we have assertTrue with a different set of parameters: the condition and the messages. One is like assertTrue(condition)


33. What do you mean by the Soft Assert in the TestNG?

Via the Soft Assert, we collect the errors while we perform the test. The soft "assert" does not throw an exception if the asset does not succeed and moves to the next step post assert statement. If an exception occurs, we need the "assert() method," which happens to be the last statement in the @Test, and the test suite moves on with the next test.


34. What is Hard Assert in TestNG?

It throws at once the AssertException once the assert statement fails and the test suite moves to the next test.


35. What do you mean by the exception testing in TestNG?

TestNG provides an option through tracing of the Exception handling code. You verify if the code throws an exception. The exception does the validation. While the test case runs as stated  "expectedException" attribute value together with the @test annotation.


36. What do you mean by the Parameterized testing in TestNG?

It helps the developers in running one test again and again with various values. We can set the parameters in two ways:

And we set parameters in two ways. The first one is through testing.xml, and the second one is through the Data Providers.

However, this is just a glimpse. And many other questions are possible, like how we can create the data-driven framework through the TestNG and how we can "run" test case groups in parallel. Hence, take the above as an introduction, and keep reading books and discover new questions daily. Continuous study will help you grab one of the best jobs.


Some more Questions on Selenium:

We include "10" more questions below, which will give you an idea that there can be numerous questions, and you need to learn the whole Selenium as only then you can craft the best test cases with the help of the Selenium. Some more questions are as below:


37. Which "open-source frameworks" are supported by the Selenium web drivers?

The answer is JUnit and TestNG. 


38. Can you mention some of the locators in Selenium?

Yes, three are ID, ClassName, TagName. We have five more such. They are CSS selector LinkText, XPath, PartialLinkText, and Name.


39. How Does Xpath help a Selenium tester?

It locates the elements. Through it, we navigate via the "attributes and elements" in the XML document to "locate" the web element like button, textbox, image, checkboxes, and a lot more on the web page.


40. When do you make use of the CSS selector?

We use it when the ID and the name locators do not turn out to be unique. And similarly, we make use of XPath when we don't have any preferred locators.


41. How are the Single slash and the Double slash different?

By single slash, we mean the XPath with an absolute path, and by a double slash, we mean XPath with a "relative path."


42. How the "Assert" and the verify differ in the case of Selenium?

If the "assert" is True, then the program executes the next test step. Though, It does not if it's false.

However, the program executes no matter the Verify is true or false.


43. How Soft Asset and hard assert are different?

The first collects the errors during @Test, and it does not throw an exception if the assert fails and moves on with the next step post assert statement.

The "Hard Assert" throws an AssertException on the failure of the assert statement. And the suite moves on with the next test.


44. How the setSpeed() and the sleep() methods differ?

Both delays the "execution speed." The first applies the delay time before the operation. Like setSpeed(4000). It waits for 4 seconds. And the second one sets the wait time only once when we call the Selenium script. Like sleep (3000) waits for 3 seconds.

55. What do you mean by verification points?

We make use of the Selenese Verify as the "verification point" and the "assert commands." We don't have any pre-built feature in WebDriver for verification points. We use a coding style. And some of them are for checking page title, checking text, and checking elements like drop-down, button, etc.

Final Tip:

You need to understand that ultimately you have to write the test cases in Selenium and execute them. However, you cannot do that if you do not have complete knowledge. You need detailed knowledge for this, and hence you should learn Java and all the nitty-gritty of the Selenium if you want to succeed as a Selenium tester. 

You can contact Naresh I Technologies for your Selenium online training. We provide Selenium training in Hyderabad and USA, and in fact, you can contact us from any part of the world through our phone or online form on our site. Just fill it and submit it, and one of our customer care executives will be contacting you. And what else you get:

  • You have the freedom to choose from Selenium online training and classroom training.

  • Chance to study from one of the best faculties and one of the best Selenium training institutes in India

  • Nominal fee affordable for all

  • Complete training 

  • You get training for tackling all the nitty-gritty of Selenium.

  • Both theoretical and practical training.

  • And a lot more is waiting for you.

You can contact us anytime for your Selenium online training and from any part of the world. Naresh I Technologies caters to one of the best Selenium training in India.

 

What are the Prerequisite to Selenium- About Selenium WebDriver

In this blog, we elaborate on the Selenium WebDriver. The popular tool used for automated tests, as it is an "automated" test framework. It's Open Source, and you use it with any popular programming language such as Python, Java, C#, Perl, etc. And it automates browser activities. Via this article, we explain all that you require for a know-how of the testing of web apps through Selenium WebDriver. We provide complete Selenium training for Selenium certification. Naresh I Technologies also is the number one computer training institute in Hyderabad and among the top five computer training institutes in India.

And in this Selenium Tutorial, we cover What Selenium WebDriver is and whether it's easy or tough to learn. We will then be discussing what it does and its basics. Moving forward, we will look at the Selenium RC drawback and how WebDriver originated, and then we will discuss the browser elements. We then look at how we can locate the browser elements on the web page. And we end up with a look at the operations we perform on browser elements.

This blog post gives you a complete glimpse of the essential concepts needed for selenium certification.

What Is Selenium WebDriver?

The Selenium web-based automation testing framework tests the web pages executed in different web browsers and distinct operating systems. And in fact, you are up with the freedom to write the test scripts in various programming languages like Java, Perl, Python, JavaScript, PHP, and c#. You should note that Mozilla Firefox is the Selenium WebDriver's default browser.

However, the freshers sometimes doubt as below.

Is "Selenium" easy to learn?

Selenium, in reality, is very easy to learn. And for mastering it, you need basic knowledge of any popular programming language like Java, C#, Perl, Python, or PHP. If you possess the "knowledge" of any of the above programming languages, you can easily craft the test cases. However, suppose you do not know any, you need not worry as Selenium IDE is GUI based, which you use as a tool with "huge effect."

What does Selenium software do?

Below are some of the captivating applications of the Selenium software:

Automated Testing: This is handy when we deal with the "bigger" projects where if it's not "Selenium," the tester does the manual testing for each functionality. Via the "Selenium," each of the manual tasks gets automated.  And, this diminishing the burden as well as stress that's over the testers.

Cross Browsers Compatibility: The Selenium supports almost all the browsers like Mozilla Firefox, Chrome, Internet Explorer, Opera, and Safari.

Increase the Test Coverage:  Through the test automation, the testing time reduces, which results in the tester getting free time for performing the testing over various test scenarios in that time.

It reduces the Test Execution Time: Via "Selenium," you execute multiple test execution side by side. And this reduces the test execution time considerably.

Supports "numerous OS":  This testing tool supports various OS like Windows, UNIX, LINUX and Mac, etc. With the Selenium WebDriver, it's possible to make the test cases on the Windows OS and then execute it on the Mac OS.

What are the basics of "Selenium?"

The WebDriver came into existence since Selenium version 2.0. In Selenium v1, we had only IDE, Grid, and RC. However, the "major output" in the Selenium project was WebDriver and its inclusion as a substitute for the Selenium v2. Though, with v3, RC no more exists and has been moved to the legacy package. However, you can "download" still and work with the RC. However, you should not expect any support for it.

In few words, the various advantages that we get through the WebDriver over the RC are as below:

It supports most of the programming languages, web browsers, and operating systems.

You overcome various drawbacks of Selenium 1 such, as the file upload, pop-ups, download, and dialog barrier.

We are up with easy commands in comparison to RC and a "more powerful API."

It supports batch testing, data-driven testing, and Cross-browser testing.

However, the main drawback compared to the RC is that you cannot generate the test reports. Via the RC, you get a "report."

The test script invokes the Selenium WebDriver, and the WebDriver automates the web browsers, and we have already listed the supported programming languages and the web browsers. The test scripts are written in any one of the programming languages supported. 

However, you might ask why we need Selenium WebDriver? In the upcoming section, we discuss the Selenium RC drawbacks as that is the "reason" for the emergence of the WebDriver.

The emergence of Web Driver, drawbacks of RC

You might be amazed to hear that Selenium RC was an instant blockbuster on the launch. It's because it surpassed the same-origin policy problem. It was the main problem during the testing of the web apps through the Selenium Core. However, do you understand what is the "same-origin policy?"

It's the rule that puts into work the web application security model. The web browser allows the JS codes to leverage the web page elements if both the JS and the web page hosts on the same domain.

Selenium core was a JS-based testing tool that found itself handicapped, as such since it could not test all web pages.

However. with the emergence of the Selenium RC, the testers were free from the same-origin policy issue though the question was how the RC did that? It did that through the application of another component known as the Selenium RC server. Hence, RC is a combination of the Selenium RC server and the Selenium RC client.

The Selenium RC server happens to be an HTTP proxy server designed to trick the browser realizing, selenium Core and the web application tested are on the same domain. Hence, there is no stoppage for the JS code from the assessment and test of the website.

Despite that the Selenium RC was a big hit, there were some issues. And the major one was the time consumed for test execution. The Selenium RC server is in mid of the communication between the browser and the Selenium commands. And the test executions are quite time-consuming. Other than the time factor, the RC architecture is as well a little complicated. 

The architecture comprises the injection of the Selenium Core inside the web browser. The selenium core registers the instructions from the RC server and converts them to the JS command. The JS code accesses and tests the web elements. 

For overcoming the above issues, the Selenium WebDriver came into existence. The WebDriver is brisker as it talks directly with the browser. And you will not find any external proxy server. You will find simplicity in architecture and the browser controlled at the OS level. 

There is one more benefit we get through the WebDriver, and that's it allows the HTML unit drover testing as well, and that is a headless driver. Through the headless driver, it means that the browser comes with no GUI. The RC, however, does not support it. And that's why WebDriver is better than RC.

Before understanding the Selenium concepts, we need to have a good knowledge of Java or any of the object-oriented programming languages. The supported languages are C#, Java, PHP, and Python.  And at present, the Selenium WebDriver happens to be most popular with C# and Java.

Let's now move forward and understand the browser elements in the next part of the tutorial.  We explain the "elements" and how the testing occurs on these web elements.

What Are Browser Elements?

We have different components present on the web pages, and elements are such components. And the most popular "elements" you will find in the browser are:

  • Test boxes

  • Images

  • CTA Buttons

  • Hyperlinks

  • Images

  • Text area/error messages

  • Web table/HTML table

  • Frame

  • Radio buttons/Checkboxes

And "testing" each of the above means, we check whether they work fine and respond in the manner expected. As an example, if we test text boxes, what you "test."

  • We can send the text or numbers via the text boxes.

  • We retrieve the text sent to the text boxes etc.

When we test any image, we need to download or upload the image. Or we might want to click on the image link or retrieve the image title etc.

And like that, we can perform various operations on each of the above elements. Though only once the "elements" get located on the web pages, we perform the "operations" and begin the testing, correct? Hence, in the next section, we cover the element locator techniques.

Locating the Browser elements over the Web pages

Each of the elements over the web page has attributes or properties. And there can be more than one attribute, and the "majority" is unique for each "element." Like, you can consider the pages to have two elements: the text box and the images. And each of these elements has the Name attributes and the ID attributes. And these attribute values requires values for each of the "elements." The two "elements" hence, cannot have the same value for an attribute. However, two elements can have the same value for the class name. 

In our example, the text box and the image cannot have the same value for the ID and the Name value. Though, you will find some attributes common for a group of elements on the page. You will come to know about these attributes later in this blog. However, let's list "8 attributes," which we can locate the elements. And they are the ID names, Class Name, Link Text, Tag Name, CSS, XPath, and Partial Link Text.

Since these elements are with these attributes, we denote them as the locators. And they are:

By.id

Syntax: driver.findElement(By.id("zzz"));

Similarly, we have the syntax for the locators mentioned above.

And through the syntax above, you will find why the locators are known as the inside methods. Hence, before moving further, we need to learn the "methods," the functions, and the browser commands. It's applied for performing the operations on the elements.

Operations on Browser Elements

Keep your eclipse IDE open with the installed Selenium package installed. 

For starting the web page testing, we require the "opening of the browser" and then move to the web page through the URL, Use the below piece of code, where this replicate. The Firefox browser gets first initiated, and then we navigate to the NareshIT Home page.

import org.openqa.selenium.WebDriver;  This is a library package for initiating the loaded a certain driver.

import org.openqa.selenium.firefox.FirefoxDriver; This is the library package which has the FirefoxDriver class required for starting the FirefoxDriver on initiation of the browser by the WebDriver class.

System.setProperty(“webdriver.gecko.driver”, “files/geckodriver.exe”);– This command issues the run time engine that the Gecko driver is located at the specified path. And since the Firefox 35, we download the Gecko driver to work with the WebDriver. In case you need to test over the Chrome, you download the ChromeDriver that is an exe file and mention the path through the lines of codes. And we have to do the same in case of each browser as well.

WebDriver driver = new FirefoxDriver(); – We initiate the firefox driver object through this command. 

driver.get(“https://www.nareshIT,in/”); – We open the mentioned URL through this method. 

driver.getTitle(); – Through this command, we fetch the title of the current tab.

driver.quit(); – This closes the browser driver.

However, suppose you need to navigate to another URL and then make the testing? In this case we make use of the navigate.io () as described in below snippet. And if you need to come back to the pre page. And you can come back to this through the navigate.back() command. And like that we can refresh the current page with the help of the navigate.refresh() command. 

As you will find in most of the basics, let's move to the new topic. We need to find an element on the web page, and then you need to operate as possible.

Create a WordPress.com account. We will find below how we can log into WordPress bypassing all the credentials from the code.

We have the two text fields in the WordPress.com login page, one is the email, and the other is the password. We need to locate these two elements, and then pass these credentials, and then find the third element Login button that we need to click.

On inspection, you will find that (Ctrl + Shift + i) opens the same window in the browser. Now, below elements, all the "elements" on the page shows. And also shown are their attributes. Though, three portions highlights. The first highlighted element is the email text field and the second is the password text field, and the third is the Login button.

If you recall, we mentioned earlier that these elements locate through the element locator. Let's now make use of these elements and provide the field values. It's the syntax for finding the element: driver.findElement(By.id("zzz"));

For providing the values, we need to make use of the sendKeys("credentials"),

For tapping the button, we need to make use of the click () method.Let's start by finding the elements, and then we will execute the operations through it. The code happens to be as below:

In line 1, we identify the email through the name attribute and send it the EmainID.

In line 2, we find the password element through the "Name" attribute and then send it the password.

In line 3, we locate the login button element through unique ID and then tap over it through the click () method.

However, only these lines are not enough. Because of the "page dynamics," it does not respond at once, and by the time the page load, the WebDriver gets terminated and throw timeout exception error. And this issue might not occur on the WordPress.com page as it is fast, though it might happen on various E-commerce site and various other dynamic web sites.

For overcoming this issue, we need to use the advanced technique. We request the WebDriver to wait after we access the page, and once it loads fully, we locate the element. And then we perform the actions.

If the WebDriver needs to wait unless the element loads in the web page and then shut the browser, then we achieve this through the driver.wait() method or the Threads.sleep()  method. Though, if you write more advanced code, then we can make use of the implicit waits or the explicit waits. However, in the current case, we use the below command: 

However, while we work on the wait conditions, you need to import the below library:

We perform this as the class for the wait, and such methods are in this.

The whole code is as below:

When you will provide the credentials in the original and execute this code, the WordPress.com page will open in the new window, and after entering the credentials, it logs in to accounts.

Congratulations, we have logged in successfully, and our whole code executes correctly.

We have made use of the ID and Name attributes for the location of elements. And you can make use of the other locators like XPath. You can make use of any element locator and as a requirement.

Thus, we saw the drawbacks of the Selenium RC and why we were up with Selenium WebDriver. We saw in detail the advantages of the WebDriver over the RC. And then, we saw how we replaced the RC with the WebDriver to ensure automation of testing. Then we saw how we log in to the WordPress site using the "selenium" in Eclipse IDE. And that completed our tutorial.

You can contact Naresh I Technologies for your Selenium online training. We provide Selenium training in Hyderabad and USA, and in fact, you can contact us from any part of the world through our phone or online form on our site. Just fill it and submit it, and one of our customer care executives will be contacting you. And what else you get:

  • You have the freedom to choose from Selenium online training and classroom training.

  • Chance to study from one of the best faculties and one of the best Selenium training institutes in India

  • Nominal fee affordable for all

  • Complete training 

  • You get training for tackling all the nitty-gritty of Selenium.

  • Both theoretical and practical training.

  • And a lot more is waiting for you.

You can contact us anytime for your Selenium training and from any part of the world. Naresh I Technologies caters to one of the best Selenium training in India.