YouTube Icon

Interview Questions.

Top 50 Selenium Interview Questions - Jul 28, 2022

fluid

Top 50 Selenium Interview Questions

Q1. Give Selenium Ide Tool Disadvantage?

The selenium IDE tool works best in Mozilla Firefox browser

Multiple windows are not performed while it is recorded.

Q2. What Is The Difference Between Single And Double Slash In Xpath?

/

start selection from the record node

lets in you to create 'absolute' path expressions

instance “/html/body/p” matches all the paragraph elements

//

start selection matching everywhere in the docume

allows you to create 'relative' course expressions

example. “//p” fits all of the paragraph elements
 

Q3. If One Wanted To Display The Value Of A Variable Named Answer In The Log File, What Would The First Argument To The Previous Command Look Like?

Echo()

Q4. How To Developer Selenium Test Cases?

Using the Selenium IDE, QA Tester can report a test to comprehend the syntax of Selenium IDE instructions, or to check the simple syntax for a particular kind of person interface. Keep in mind that Selenium IDE recorder isn't always smart as QA Testers want it to be. Quality warranty group need to never keep in mind Selenium IDE as a "report, save, and run it" device, all the time expect transforming a recorded take a look at instances to make them maintainable within the future.

Q5. What Is The Use Of Context Menu In Selenium Ide?

It allows the person to pick out from a list of assertions and verifications for the selected location.

Q6. What Is The Selenium's Recording Language?

Selenium’s recording language is “HTML”.

Q7. How Do You Verify An Object Presented In Multiple Pages?

Check on each web page

  assertTrue(selenium.IsElementPresent(locator));

Q8. What Are The Limitations Of Selenium Ide?

Selenium IDE has many excellent features and is a fruitful and properly-prepared take a look at automation tool for developing take a look at instances, in the identical time Selenium IDE is lacking sure vital functions of a testing tool: conditional statements, loops, logging capability, exception managing, reporting functionality, database checking out, re-execution of failed checks and screenshots taking capability. Selenium IDE would not for IE, Safari and Opera browsers.

Q9. What Is Selenium Ide?

Selenium IDE is an integrated development surroundings for Selenium assessments. It is applied as a Firefox extension, and has a recording function, in order to preserve account of user movements as they are executed and save them as a reusable script to play back. Selenium-IDE additionally offers full enhancing of take a look at cases for greater precision and control.

Q10. Which Is The Command Used For Displaying The Values Of A Variable Into The Output Console Or Log?

The command used for showing the values of a variable into the output console or log - echo

If you want to show a consistent string.

The under cited command may be used echo

ex: echo "The sample message" If you want to show the cost of a variable it is able to be written like underneath

echo $variable name

instance: echo $var1

Note: Here var1 is the variable

 

Q11. What Are The Features Of Selenium Ide ?

Record and playback

Intelligent subject choice will use IDs, names, or XPath as needed

Auto complete for all commonplace Selenium instructions

Walk via check cases and check suites.

Debug and set breakpoints

Save texts as HTML, Ruby scripts, or other formats

Support for Selenium user-extensions.Js report

Option to mechanically assert the identify of each page

Rollup not unusual commands
 

Q12. Explain About Selenium-ide ?

Selenium IDE is an integrated development surroundings for Selenium assessments.

Operates as a Firefox add-on and offers an interface for developing and going for walks character check cases or whole check suites.

Selenium-IDE has a recording function, so that you can preserve account of user actions as they're finished and shop them as a reusable script to play back.

It also has a context menu (proper-click on) integrated with the Firefox browser, which allows the consumer to pick out from a list of assertions and verifications for the selected location.

Offers full enhancing of test cases.

Although it's miles a Firefox most effective add-on, exams created in it could additionally be run in opposition to different browsers by means of the usage of Selenium-RC & specifying the name of the check suite on the command line.

Q13. In Selenium Ide, Give The Usage Of Context Menu?

It permits user to choose from assertions and verifications listing for selected particular area.

Q14. How To Insert A Breakpoint In Selenium Ide?

Break point can be set in two ways in Selenium IDE

Right click on on the command in Selenium IDE and select "Toggle BreakPoint"

Select the command in Selenium IDE and press "B" key at the keyboard

If you want to clear the spoil factor over again Spress "B" key at the keyboard

You can set more than one wreck factors in Selenium IDE

Q15. What Are Heightened Privileges Browsers?

Firefox and IE have browser modes which aren't constrained by using java script’s same origin policy. These browsers are called browsers with improved safety privileges. In case of Firefox it's miles called chrome (It’s not the Google browser) and in case of IE it's far called iehta

Q16. Define Selenium 2.X?

It is the next technology selenium. It is selenium server-internet driver that replaces Selenium RC.

Q17. What Distinguishes Between An Absolute And Relative Url In Side?

Absolute URL: Its is base url and this represent domain cope with. Relative URL: (Absolute URL + Page Path). Open command makes use of Base URL (Absolute URL) to navigate web web page.

Q18. What Is The Price Of Selenium License Per Server?

Selenium is open supply software, launched under the Apache 2.0 license and can be downloaded and used with out rate.

Q19. Explain About Selenium-grid ?

Selenium-Grid allows the Selenium-RC solution to scale for take a look at suites or take a look at suites to be run in a couple of environments.

With Selenium-Grid more than one instances of Selenium-RC are running on numerous operating system and browser configurations, each of these while launching sign up with a hub. When checks are despatched to the hub they may be then redirected to an available Selenium-RC, with a view to release the browser and run the take a look at.

This allows for strolling assessments in parallel, with the whole check suite theoretically taking best as lengthy to run as the longest person take a look at.

Q20. I Have Created My Own Firefox Profile; Can I Execute My Test Scripts On It

You may want to create your own firefox profile because Selenium always created a smooth firefox profile at the same time as executing the tests and none of your FF settings and plug-in are taken into consideration with this smooth profile. If you need to execute assessments on FF with your settings then you must create custom profile for FF.

To be capable of execute assessments on a custom firefox profile you ought to specify its course at the same time as starting Selenium server. For instance in case your new profile is stored at “extraordinary vicinity” to your directory then you need to begin Selenium server as following–

Java –jar .Jar -firefoxProfileTemplate "first-rate location"

Q21. What Does Side Stand For?

Selenium IDE. It become a very difficult interview question.

Q22. How To Run Test Case Traced By Employing Ide In Browsers?

Selenium faraway manage is utilized in this case.

Q23. Is There A Way For Me To Know All Available Options When I Start Selenium Server?

If you need to look all options available whilst beginning Selenium server then you definitely must use option “-h” while starting Selenium server

Java –jar .Jar –h

It would display you all the options which you could use at the same time as starting the Selenium server.

Q24. How Recorded Command Can Be Edited In Ide?

First choose and pick fascinated value from drop-down.

Q25. What Are The Advantages And Disadvantages Of Selenium ?

Advantages

Supports C#, Java, PHP, Perl, Python

Supported on Windows, Linux and Mac OS

Highly lively developer community - sponsored by way of Google

Powerful techniques to locate factors (Xpath, CSS, DOM)

Disadvantages

Challenges running on browsers aside from Firefox

Difficulty to automate AJAX

Limitations to automate Applets, MS and Desktop Applications

Q26. How To Test Ajax Application With Selenium?

Ajax interview questions will be hard for novice inside the take a look at automation, however could be without difficulty cracked by using Selenium Tester with a applicable enjoy. Read the particular technique at Testing Ajax programs with Selenium inside the proper manner

Q27. How Do I Upload A File Using Selenium? I Need To Upload A Word File During Test Execution.

If you are using Firefox then you could use “type” command to type in a File Input container of upload report. But type operation does not paintings with IE and you'll ought to use “Robot” elegance in java to paintings make file upload work.

Q28. How Do You Set User Extensions In Selenium Ide?

Open person-extensions.Js with an editor (Notepad, etc.); it is found inside the seleniumcorescripts folder. If it would not exist, simply create it.

If you want to, devote the person-extensions.Js file (like if you use subversion).

Open Selenium IDE and choose the Options menu after which Options... From that menu.

Make sure the course for your consumer-extensions.Js record is entered in the Selenium Core extensions field (like seleniumcorescriptsuser-extensions.Js)

Press OK button on alternatives

Restart the IDE to mirror your extensions.

Q29. What Programming Languages Can You Use In Selenium Rc?

C#, Java, Perl, PHP, Python, Ruby

Q30. What Programming Language Is Best For Writing Selenium Tests?

The web packages may be written in Java, Ruby, PHP, Python or every other web framework. There are sure benefits for the use of the identical language for writing check cases as application beneath check. For instance, if the group have already got the revel in with Java, QA Tester should constantly get the piece of advice at the same time as learning Selenium check cases in Java. Sometimes it's miles higher to pick out easy programming language with a purpose to in the end supply higher achievement. In this case QA testers can adopt less complicated programming languages, for instance Ruby, a good deal faster comparing with Java, and may turn out to be turn out to be experts as quickly as feasible.

Q31. Explain Selenium Waitfor Commands ?

WaitForPageToLoad : This command will make the script to attend till the web page hundreds.Syntax is waitForPageToLoad(timeout); Timed out is the most time the script will watch for the page to load.

WaitForAlert : This command will look forward to the alert message to appear

waitForTable: This command will wait for the Web table to absolutely load within the page

waitForTitle: This command will for the page Title to seem at the browser.

Other waitFor instructions : Selenium has numerous other wait command like waitForText,waitForPopup and so forth. These instructions are generically referred to as Synchronization commands

Q32. Do You Know Any Alternative Test Automation Tools For Selenium?

Selenium appears to be the mainstream open supply tool for browser aspect testing, but there are numerous alternatives. Canoo Webtest is a super Selenium opportunity and it is probably the quickest automation device. Another Selenium opportunity is Watir, however with the intention to use Watir QA Tester has to analyze Ruby. One extra opportunity to Selenium is Sahi, however is has difficult interface and small builders network.

Q33. How Do You Capture An Element Loading After The Page Load?

Provide a time to check the element( in seconds) Like :

public void waitForElementPresent(String detail, int timeout) throws Exception     for (int second = zero;; 2nd++)    if (2nd >= timeout)  fail("Timeout.Unable to discover the Specified element"+detail);  try        if (selenium.IsElementPresent(element)) smash;     capture (Exception e)    Thread.Sleep(a thousand);    

Q34. What Is Selenium Webdriver?

Selenium WebDriver is a tool for writing automatic exams of websites. It is an API name and objectives to mimic the behaviour of a real user, and as such interacts with the HTML of the software. Selenium WebDriver is the successor of Selenium Remote Control which has been officially deprecated.

Q35. What Does A Right-pointing Green Triangle At The Beginning Of A Command In Side Indicate?

Play Entire Test Suite

Q36. Describe Technical Problems That You Had With Selenium Tool?

As with another form of check automation equipment like SilkTest, HP QTP, Watir, Canoo Webtest, Selenium allows to report, edit, and debug checks cases. However there are numerous problems that significantly have an effect on maintainability of recorded check cases, occasionally Quality Assurance Engineers bitch that it takes extra time to keep automatic check cases than to perform guide trying out; but this is an problem with all computerized checking out equipment and maximum possibly related to wrong testing framework layout. Another problem is complex ID for an HTML element. If IDs is auto-generated, the recorder test cases may additionally fail at some stage in playback. The paintings round is to apply XPath to discover required HTML detail. Selenium helps AJAX with out problems, however QA Tester need to be aware that Selenium does no longer recognise while AJAX action is completed, so ClickAndWait will not work. Instead QA tester ought to use pause, however the snowballing impact of several 'pause' instructions could actually sluggish down overall checking out time of take a look at cases. The excellent answer could be to use waitForElement.

Q37. Which Selenium Command(s) Simulates Selecting A Link?

Click on, clickandWait, ClickAt, ClickAtandWait, DoubleClick, DoubleClickandWait, doubleClickAt,

doubleClickAtandWait

Q38. My Application Uses Ajax Heavily How Do I Use Selenium Rc To Work With Ajax Operations?

Ajax operations don’t reload a page like ordinary form submission but they make http requests in the back of the scene. You can not use waitForPageToLoad for such operations and instead have to use conditional look ahead to alternate in kingdom of application. This could as nicely imply waiting for presence of an element before continuing with test operations. Consider following instance in which kind operation triggers Ajax operation that is observed through conditional wait for presence of a text field

// kind operation brings element “q” on screen with out loading the web page

  selenium.Kind("elementLocator","testData");  // conditional watch for element “q”  for(intsecond = 0;; 2nd++)   if(2d >= 60) fail("timeout");  try if(selenium.IsElementPresent("q"))smash;capture(Exception e)  Thread.Sleep(one thousand);  

Q39. What Are The Advantages And Disadvantages Of Using Selenium As Testing Tool?

Advantages: Free, Simple and powerful DOM (report item model) stage checking out, may be used for non-stop integration; first rate in shape with Agile projects.

Disadvantages: Tricky setup; dreary errors diagnosis; can't check consumer server programs.

Q40. What Are The Advantage And Features Of Selenium Ide?

Intelligent subject choice will use IDs, names, or XPath as wanted

It is a report & playback tool and the script layout can be written in various languages along with C#, Java, PERL, Python, PHP, HTML

Auto entire for all commonplace Selenium commands

Debug and set breakpoints

Option to mechanically assert the identify of every web page

Support for Selenium person-extensions.Js record
 

Q41. What Test Can Selenium Do?

Selenium will be used for the practical, regression, load checking out of the web primarily based programs. The automation device will be applied for publish launch validation with continuous integration tools like Jenkins, Hudson, QuickBuild or CruiseControl.

Q42. How To Insert A Comment In Selenium Ide?

Comments in Selenium IDE may be set in  approaches

Right click on the command in Selenium IDE and select "Insert New Comment"

If you need to comment an present line. You need to comply with the beneath mentioned steps.

Select the supply tab in IDE

Select the road that you need to comment

Assume that in case you need to comment a open command you need to jot down like under cited code

  <tr>   <!--   <td>open&l/td>  <td>/node/304/edit&l/td>  <td></td>  -->  </tr>

Q43. What Are The Steps To Run Automation Using Selenium?

The very simple steps are:

Record the take a look at steps the usage of selenium-IDE.

Modify the script in step with the testing desires. Add validation factors, Java Scripts, Time-out and so on.

Run the check.

View the result after test run complete examine.

Q44. How Much Does Selenium License Cost Per Client Machine?

Selenium is open supply software, released below the Apache 2.Zero license and can be downloaded and used with out fee.

Q45. How Can I Learn To Automate Testing Using Selenium?

Don't be surprised if the interviewer asks you to explain the technique for getting to know Selenium. This interviewer wants to pay attention how you can modern software program take a look at automation system the company. Most possibly they're looking for software professional with an awesome Selenium revel in, who can do Selenium schooling for group participants and get the group started with test automation. I desire this Selenium academic can be useful inside the education for this Selenium interview question.

Q46. Which Are The Browsers Supported By Selenium Ide?

Selenium IDE helps simplest one browser Mozilla Firefox. The versions supported as of now are:

Mozilla Firefox 2.X

Mozilla Firefox three.X

The variations no longer supported as of now are:

earlier variations of Mozilla Firefox 2.X

Mozilla Firefox four.X

Q47. What Is Selenium-rc (faraway Control) ?

Selenium-RC offers an API (Application Programming Interface) and library for each of its supported languages: HTML, Java, C#, Perl, PHP, Python, and Ruby. Selenium-RC permits the take a look at automation developer to apply a programming language for maximum flexibility and extensibility in growing check good judgment.

For example, if the utility underneath take a look at returns a result set, and if the automatic test program desires to run tests on every detail within the result set, the programming languages new release aid can be used to iterate thru the result set, calling Selenium commands to run exams on every object.

Q48. Give Ide's Main Parts And Components?

Target

Command and

Value

Q49. I Am Not Able To Use "style" Attribute To Locate Element With Ie Browser?

This is because IE expects characteristic values to be in caps whilst other browsers count on it to be decrease case letters. Hence

//tr[@style="background-color:yellow"] works with other browsers

//tr[@style="BACKGROUND-COLOUR:yellow"] works with IE

Q50. What Are The Test Types Supported By Selenium?

Selenium might be used for testing the internet primarily based packages. The test sorts can be supported are:

purposeful,

regression,

load testing

The automation device may be applied for put up release validation with continuous integration tools like:

Jenkins,

Hudson,

QuickBuild

CruiseCont




CFG