Search

Showing posts with label Selenium. Show all posts
Showing posts with label Selenium. Show all posts


Selenium Interview Question - in detail - 4


1    1)  Which is the command used for displaying the values of a variable into the output console or log?

The command used for displaying the values of a variable into the output console or log–echo
If you want to display a constant string. The below mentioned command can be used
echo <constant string>
ex: echo “The sample message”
If you want to display the value of a variable it can be written like below
echo ${<variable name>>
ex: echo ${var1}

2) What are the capabilities of Selenium WebDriver or Google WebDriver or Selenium 2.0?

Capabilities of Selenium WebDriver or Google WebDriver or Selenium 2.0 are:
One should use WebDriver when requiring improved support for
1. Mult-browser testing including improved functionality for browsers not well-supported by Selenium-1.0.
2. Handling multiple frames, multiple browser windows, pop-ups, and alerts.
3. Page navigation.
4. Drag-and-drop.
5. AJAX-based UI elements.

3) Which are the browsers supported by Selenium RC?

Browsers supported by Selenium RC are:
1. *firefox
2. *mock
3. *firefoxproxy
4. *pifirefox
5. *chrome
6. *iexploreproxy
7. *iexplore
8. *firefox3
9. *safariproxy
10. *googlechrome
11. *konqueror
12. *firefox2
13. *safari
14. *piiexplore
15. *firefoxchrome
16. *opera
17. *iehta
18. *custom

4) What are the Operating Systems supported by Selenium?

Operating Systems supported by Selenium are:
Selenium IDE
Works in Firefox 2+ Start browser, run tests Run tests
Operating Systems Supported:
1. Windows,
2. OS X
3. Linux
4. Solaris
5. Others whichever supports Firefox 2+

Selenium Remote Control
Used for starting browser and run tests
Operating Systems Supported:
1. Windows,
2. OS X
3. Linux
4. Solaris
5. Others

Selenium Core
Used for running tests
Operating Systems Supported:
1. Windows,
2. OS X
3. Linux
4. Solaris
5. Others

5) What is the difference between an assert and a verify with Selenium commands?

Assert: Will fail and abort the current test execution.
Verify: Will fail and continue to run the test execution.

6) If a Selenium function requires a script argument, what would that argument look like in general terms?

StoreEval(script, variable) and storeExpression(expression, variableName).

7) If a Selenium function requires a pattern argument, what five prefixes might that argument have?

Five prefixes that Selenium pattern argument are:
glob, regexp, exact, regexpi.

8) Why Selenium RC is used?

We use Selenium RC for:
Selenium-IDE does not directly support:
1. Condition statements.
2. Iteration.
3. Logging and reporting of test results.
4. Error handling, particularly unexpected errors.
5. Database testing.
6. Test case grouping.
7. Re-execution of failed tests.
8. Test case dependency.
9. Capture screen shots on test failures.
The reason behind why Selenium-IDE does not support the above mentioned requirements is IDE supports only HTML language. Using HTML language we cannot achieve the above mentioned requirements. Because HTML does not support conditional, looping and external source connectives.
To overcome the above mentioned problems Selenium RC is used.

9) How many testing frameworks can QA Tester use in Selenium RC?

Testing frameworks aren't required, but they can be helpful if QA Tester wants to automate test cases. Selenium RC supports Bromine, JUnit, NUnit, RSpec (Ruby), Test::Unit (Ruby), TestNG (Java), unittest (Python).

10) What is the architecture of Selenium RC?

The Selenium Server launches and kills browsers and acts as an HTTP proxy for browser requests.
Client libraries for various programming languages, each of which instructs the Selenium Server in how to test the AUT by passing it your test script’s Selenium commands.
The client libraries communicate with the Server passing each Selenium command for execution. Then the server passes the Selenium command to the browser using Selenium-Core JavaScript commands. The browser, using its JavaScript interpreter, executes the Selenium command, which effectively, runs the check you specified in your Selenese test script.

11) Does Selenium support mobile internet testing?
Selenium supports Opera and opera is used in most of the Smart phones. So whichever Smart phone supports opera, selenium can be used to test. So, one can use Selenium RC to run the tests on mobiles.

12) What are the basic annotations used to run TestNG tests in Selenium?

The basic annotations used to run TestNG tests in Selenium RC:
1. @BeforeClass: The annotated method with @BeforeClass will be run before the first test method in the current class is invoked.
2. @AfterClass: The annotated method with @AfterClass will be run after all the test methods in the current class have been run.
3. @BeforeMethod: The annotated method with @BeforeMethod will be run before each test method.
4. @AfterMethod: The annotated method with @AfterMethod will be run after each test method.
5. @Test: Marks a class or a method @Test with as part of the test.

13) What is the difference between Thread.Sleep() and Selenium.setSpeed()?
Selenium.setSpeed:
1. takes a single argument in string format
ex: selenium.setSpeed("2000") - will wait for 2 seconds
2. Runs each command in after setSpeed delay by the number of milliseconds mentioned in setSpeed.

Thread.sleep:
1. takes a single argument in integer format
ex: thread.sleep(2000) - will wait for 2 seconds
2. Waits for only once at the command given at sleep.

14) How to configure Selenium RC with eclipse to run Junit Tests?

1) Download eclipse. click here to download the software
2) Open eclipse -> Workspace Launcher window will open
3) Create a workspace by giving meaningful name
3) Click on Workbench
4) Create a project of type java
5) Create a package under src folder of the package
6) Add Junit to the build path
7) Add selenium rc java client driver to the build path
8) Now drag and drop your test script (.which is exported from Selenium IDE) to the package created.

15) Actual end user simulation, Is the test conducted using this tool equivalent to an end user action?

Selenium performs actions in the background on the browser. It modifies the DOM structure of the HTML page in order to perform actions on the page. To be more precise it executes JavaScript on UI objects within the webpage to perform actions like click, type, select etc. This is the reason why you can execute tests with the browser minimized.

QTP claims to perform end user simulation, in other words executing QTP scripts are equivalent to a person performing those steps manually on the application.

16) Is it possible to use Selenium for multi-user Load Testing?
Yes, but it requires a LOT of hardware. We recommend you check out BrowserMob, which does load testing with real browsers and is powered by Selenium.
1. Define Selenium?
Widely used automation tool for testing based on web is known as Selenium. It is very simple and easy to learn. Selenium tools set assisting development rapidly of test automation scripts for application based on web. The testing tools of Selenium offer rich set of testing functions exclusively designed to accomplish testing requirements of web based applications. .

2. Define Selenium 2.x?
It is the next generation selenium. It is selenium server-web driver that replaces Selenium RC.

3. What is needed to be good at Selenium?
HTML basic knowledge, web technologies and web based testing are mandatory. Other software development languages are not needed. It is better to have knowledge on JAVA script.

4. From where, you can download selenium?
Initially, visit official site of Selenium to get information about it. Different version scan be downloaded from official site.
5. How Selenium IDE can be used?
Please visit htpp://seleniumhq.org
6. What is recording language of Selenium?
HTML


7. Give the steps for running automation using selenium?
The basic steps are given below:
• Record test steps by making use of selenium-IDE
• Change the script according to the requirements of testing. Add java scripts, validation points, Time-out, etc.
• Now, run test
• Result can be viewed after analyzing test run

8. Define selenium test suite and how it is developed?
The main concept of software testing is to group test cases as test suite. HTML files containing links of test cases in selenium. To run test suite, selenium IDE plug-in called Test runner is used.

9. Define SIDE?
It is defined as Selenium IDE.

10. How to run test case traced by employing IDE in browsers?
Selenium remote control is used in this case.
11. Give IDE’s main parts and components?
• Target
• Command and
• Value
12. How recorded command can be edited in IDE?
First select and choose interested value from drop-down.


13. Give the default port number of selenium server?
4444

14. Give major components of selenium testing tools?
• Selenium RC
• Selenium IDE
• Selenium Grid

15. In Selenium IDE, give the usage of context menu?
It permits user to select from assertions and verifications list for chosen specific location.

16. Give Selenium IDE tool disadvantage?
• The selenium IDE tool works only in Mozilla Firefox browser
• Multiple windows are not played when it is recorded.
17. Define Selenium Grid?
In selenium testing suit, selenium permits selenium RC solution to scale for test suits that can operated on various environments. Different instances of selenium RC can be run by making use of Selenium Grid on different OS and browser configurations.
18. Describe working of Selenium Grid?
Tests are sent to hub using Selenium Grid and are redirected to Selenium RC that launches browser and run test. Thus, it permits to run tests in parallel to complete test suite.


19. What test can Selenium perform?
Generally, selenium is used for functional testing of applications that are based on web. It is used for testing in the integration environment that is constant. It can also used for agile testing.

20. Give the cost of selenium test suite?
Selenium test suite is nothing but an open source software tool that is available for free of cost.
1)  What is Automation ?
A)   In general, it is the process of implementing particular work automatically by using a machine, to reduce the need of human work in the production of goods and services...
2)  What is meant by Automation in software testing ?
A)   It is a process of testing an application(executing the tests, comparing expected and actual results under some controlled conditions and generating the reports) automatically by using a 'Tool' to reduce the need of human effort.  This tool may be Selenium / QTP / RFT / SilkTest etc...
3) Why do we need automation in software testing ?
A)  Humans can do mistakes...  If a work is to be done several times(repetitive), then, we may skip some work intentionally(purposely) or unintentionally(by mistake) due to time pressure, boring task, etc.. Inorder to overcome these problems 'automation testing' has been introduced to reduce manual task, to save cost and time, to improve accuracy, to perform repetitive execution of tests, to customize defect reporting,etc., and hence automation is needed, as it replaces human with great features...
4)  When to do automation testing ?
A)   It is not always advantageous to automate test cases.. We can do automation,
  • When the application is stable.  
  • For long term projects.
  • When you have lot of regression work.
  • When the scenario is easily debuggable.
5)  Which type of testing can be Automated ?
A)  We can automate Regression testing, Functional testing, Stress testing, Performance testing, Load testing, Smoke testing, Compatibility testing, Data-Driven testing etc..
6)  What are the advantages and disadvantages of Automation Testing ?
A)   Advantages :
  • Reduces human resources.
  • Using an automation tool, test scripts can be executed faster when compared to manual execution and hence saves time.
  • Repeatable execution of tests may lead to make mistakes when it is done manually, but, when we automate the same task, accuracy will be improved.
  • Test cases can be reused in various versions of software which saves time and cost. 
    Disadvantages:
  • Unemployment rate increases as machine replaces human..
  • It is not so easy to write automation test scripts, it requires skilled and experienced resources.
  • We cannot automate everything as it is advantageous only for repeatable and reusable test cases. 
  • Initial cost for automation is very high unless it is open source.
  • Debugging skills should be high otherwise its effect will be dangerous (mainly it kills time, so, we cannot reach dead-line).
 7)  Name some test automation tools ...
  • Selenium (Open Source)
  • HP QuickTest Professional (Commercial)
  • IBM Rational Functional Tester (Commercial)
  • HP WinRunner (Commercial)
  • SilkTest (Commercial)
  • HTTP Test Tool (Open Source)
  • WATIR (Open Source)
  • Maveryx (Open Source)
  • eggPlant (Commercial)
1)  What is Selenium ?
A)  Selenium is a combination of different software tools with different approach to automate browsers..  Its primary purpose is to automate Web applications for testing purpose and it is developed in JavaScript...
2)  What is the cost of Selenium ?
A)  Since, selenium is an open source, it is free of cost.. We can download the software from www.seleniumhq.org  
3)  What are the main components / flavors of Selenium ?
  • Selenium IDE (Integrated Development Environment)
  • Selenium RC (Remote Control)
  • Selenium Grid
  • Selenium Webdriver
4)  What tests can selenium do ?
A)  Selenium is mainly used for Functional testing, Regression testing and Load/Stress testing for web based applications...
5)  What are the advantages and disadvantages of selenium ?
A)  Advantages :
  • Its main advantage is that it is free of cost.
  • Installation of selenium software is easy.
  • Record and play back feature is available.
  • Selenium supports multiple operating systems and runs in many browsers.
  • It has a feature of converting scripts into other languages like Java, C#, Python, Ruby, etc..
  • Good support for Agile(methodology) projects.
    Disadvantages :
  • Complete set-up of selenium is somewhat critical.
  • It is not suitable for Client-Server applications.
  • Boring error analysis.
  • Selenium does not support back end test.
  • Support provided for Selenium would be very less.
6)  Name some browsers that support Selenium ?
  • Firefox
  • Internet Explorer
  • Safari
  • Opera
  • Google Chrome
7)  Operating systems that support Selenium..
  • Windows
  • Mac
  • Linux
  • Solaris
8)  Programming languages that support Selenium(with RC)..
  • Java
  • C#
  • Perl
  • PHP
  • Python
  • Ruby
9)  Name some open source tools otherthan Selenium ?
  • WATIR- Web Application Testing In Ruby, is a functional testing tool for web applications which uses Ruby scripting language..
  • Sahi- It is also an automation tool used to automate web applications which is developed in java and javascript..
  • WET- Web Tester is also a web automation testing tool which uses Watir as the library to drive web pages..
10)  Why you have chosen 'selenium' as your automation t00l ?
A)  As our project owner is not much interested in investing amount on automation, he had suggested us to use an open source tool.. Selenium is perhaps(reasonably) the best option for automating web-based applications.. Due to its popularity with good features, it would be the first choice of a tester or a company for automation testing.. Since, our team has exposure on selenium, our project manager has decided to use 'Selenium' for automation..

11)  Compare Selenium with QTP..
  • Selenium is an open source(free of cost) where as QTP(have to purchase) is commercial tool..
  • Selenium is used for testing only web-based applications where as QTP can be used for testing client-server applications also..
  •  Selenium supports Firefox, Internet Explorer, Safari, opera on operating systems like Windows, Mac, linux etc., however QTP is limited to Internet Explorer on Windows..
  • Selenium tests has the flexibility to use many languages like Java, C#, Python, Ruby, Perl and PHP where as QTP mainly supports VB script..
12)What do you think of  Performance Testing?
A) Performance testing is a technical analysis done to determine or validate the speed, scalability and/or stability characteristics of the product under test. Performance-related activities such as testing and tuning are concerned with achieving response times, throughput and resource-utilization levels that meet the performance objectives for the application under test.

13) Which tool you have used for 'Performance Testing' ?
A) We used JMeter to test functional behavior and measure performance. It can be used to simulate a heavy load on a server, network or object to test its strength or to analyze overall performance under different load types. It provides features such as a multi-threaded framework, complete portability across a variety of platforms, capability to load and performance test many different server types, highly extensible, efficient GUI design and support for offline analysis of test results. 

1)  What is Selenium IDE ?
A)  Selenium IDE (Integrated Development Environment) is an ideal tool used to develop selenium test scripts... It is the only flavor of selenium which allows us to record user actions on browser window... Here, the scripts are recorded in 'Selenese'(a set of selenium commands like Click, assertTextPresent, storeText, etc,.).. It is not only a time-saver but also an excellent way of learning Selenium scripts syntax... It is a Firefox add-0n...
2)  How to install Selenium IDE ?
      I use seleniumhq.org site to download any software regarding selenium.. Here, if we click on the version number of selenium ide it starts downloading the add-ons, just we have to click on 'install now' button and restart the firefox browser.. With-in 5 minutes we can install selenium ide...  
3)  How do you open/start selenium-ide after installation ?
A)  First launch/open firefox browser and then click on 'Tools' tab in the menu bar.. You can see an option called 'selenium ide' , click on it, a small window will be opened where you can start recording scripts...

4)  Features of selenium IDE..
  • Its main feature is record and playback..
  • Debugging features by setting breakpoints, startpoints, pause..
  • Identifies element using id, name, xpath etc..
  • Auto complete for all common selenium commands..
  • It has an option of asserting title of every page automatically..
  • Support for selenium user-extensions.js file..
  • Option to run single test or multiple tests(suite).
  • It has a feature of exporting testcase/suite into different formats like C#, Java, Ruby, Python..
5)  Advantages and disadvantages of selenium IDE..
A)  Advantages : 
  • Freeware..
  • Easy to install..
  • It is the only flavor of selenium that allows us to record user actions on browser window.. 
  •  Scripts recorded in IDE can be coverted into other languages like Java, C#, Python and Ruby..
  • It is not only a time saver but also an excellent way of learning scripts syntax..
  • We can insert comments in the middle of the script for better understanding and debugging..
  • Context menu, which allows us to pick from a list of assertions and verifications for the selected location..
Disadvantages:
  • Main disadvantage of IDE is that it runs only in firefox browser..
  • Selenium IDE can execute scripts created in selenese only.
  • Cannot upload files..
  • It does not directly support loops and conditions..
  • Reading from external files like .txt, .xls is not possible..
6)  What are the selenium locators and what is the tool you  use to identify element ?
A)  Selenium locators are the way of finding HTML element on the page to perform Selenium actions... We use firebug(for firefox) to identify elements as it is more popular and powerful web development tool.. It inspects HTML and modify style and layout in real-time.. We can edit, debug and monitor CSS, HTML and Javascript live in any web page.. ((click here to download firebug))
-->For Internet Explorer we can choose debugbar.. It views HTML DOM tree, we can view and edit tab attributes.. 
((click here to download debugbar))

7)  How do you locate elements in IDE ?

A)  I will focus on the unique attribute values like id, name or other structural information that is stable enough to withstand frequent changes to the web application.. I strongly recommend CSS selectors as locating strategy.. They are considerably faster than xpath and can find the most complicated objects in any HTML document..
8)  What is selenese ?
A)  Selenium set of commands that run our test is called Selenese.. A sequence of these commands is a test script.. There are three types of selenese..
  1. Actions : They perform some operations like clicking a link or typing text in text box or selecting an option from drop-down box etc..
  2. Assertions : They verify that the state of application conforms to what is expected.. Ex: 'verify that this checkbox is checked', 'make sure that the page title is X'..
  3. Accessors : Checks the state of application and store the results in a variable.. Ex: storeText, storeTitle, etc..

9)  How do you add check points or verification points ?

A)  They are called as Assertions in selenium.. 'assert', 'verify' and 'waitFor' are the commands used to add check points..
Ex: assertText, verifyElementPresent, waitForTextPresent, etc..

10)  Name some commands that you use frequently in IDE ?

A)  Open, click, type, select, assertText, assertTitle, assertTextPresent, verifyText, verifyTextPresent, veriftTitle, waitForText, waitForTextPresent, waitForTitle, store, storeText, storeTitle, check, uncheck, pause, mouseover, etc..

11)  What is the difference between assert and verify ?

A)   When an 'assert' fails, the test is aborted where as when 'verify' fails, the test will continue execution logging the failure.. 
'assert' is used when the expected value is mandatory to continue with next set of steps.. However 'verify' is used when the expected value is optional to continue with the next set of steps..

12)  Difference between waitFor and pause commands ?

A)  'waitFor' command waits for some condition to become true..
For example, 'waitForPageToLoad(20000)'-- it will wait upto 20 thousand milliseconds to load required page.. If the page is loaded before 20,000ms then it jumps to next step to execute.. If the page is not loaded before 20,000ms then it stops the execution due to time-out error..
--> pause command stops the execution of the test until the specified time..
Ex:  pause(10000)-- It stops the execution of test for 1o thousand milliseconds.. After completing 10,000ms it jumps to next command to execute.. I prefer 'waitFor' command than 'pause'..
13)  How do you export tests from Selenium IDE to RC ?
A)  First i will open the test in IDE, which should be exported to RC.. There after i'l select 'File' from the menu bar.. when we mouseover on 'Export Test Case As' in the file menu, we could see different languages like C#, Java, Python and Ruby.. Select the language you want to export your test and provide the name to save it..

1) What do you know about selenium RC (Remote Control)?
A)  Selenium RC starts up browsers(one at a time) and then runs commands we pass along from our tests..  It allows us to use a programming language for maximum flexibility and extensibility in developing test logic.. It provides an API and library for each of its supports languages like Java, Ruby, Python, Perl and C#..
-->Selenium RC has 2 components.. Selenium server and Client libraries.. Selenium Server launches and kills browser.. Client libraries provide the interface between each programming language and the Selenium RC server..
2) Briefly explain how Selenium RC executes your scripts ?
A)  Client libraries communicate with the Server passing each selenium command for execution.. Then the server passes the selenium command to the browser using Selenium-Core Java Script commands.. The browser, using its JavaScript interpreter, executes the selenium commands.. This runs the Selenese actions or verifications you specified in your test script..
3) What are the requirements needed to run simple script in RC ?
A)  A browser, command prompt, Selenium Server jar file are enough to run simple scripts in RC..
Selenium Server is needed inorder to run selenium RC scripts..
4) How to set up selenium RC completely with eclipse to run junit tests ?
A)    First we need to download Selenium Server jar file, Selenium client libraries, junit jar file, eclipse and java software.. There after, open eclipse and click on workbench and then create a java project with meaningful name... Set path to java and jar files... Drag and drop your test scripts(which are exported from IDE) to the package you have created in the project.. Before running any test you must start the server..
5) Why selenium RC is used ?
A)   Selenium RC is used to automate web applications with more effective browser actions when compared to SIDE(Selenium IDE).. As selenium RC uses a programming language, we can overcome limitations of SIDE i.e we can handle multiple windows and pop-ups, we can use loops and conditions, capturing screenshot etc.. In addition to that, RC can perform Data-Driven(read/write data from external files) concept, decent report generation and mailing that report to concern person etc.. 
6) What are the languages and operating systems that support RC ?
A)   RC supports languages like Java, C#, Perl, Ruby, Python and PHP.. Operating systems like Windows, Mac OS X, Linux, Solaris etc..
7) What are the advantages and disadvantages of RC ?
A)  advantages:
  • Selenium RC can be used for any java script enabled browser..
  • Support for many operating systems and Programming languages..
  • We can use loops and conditions for better performance and flexibility..
  • Decent report generation..
  • Can handle Dynamic objects and Ajax based UI elements..
  • Can read/write data from/to .txt, .xls, etc..
disadvantages:
  •  There are very limited features in RC when working with Ajax based UI elements..
  • Cannot handle on-load alerts..
  • Controlling multiple windows is somewhat difficult..
8) In Selenium what are the four parameters you have to pass?
A)    Host, port number, browser and URL...
9) Can we handle pop-ups in RC ?
A)    Yes, we can handle pop-ups in RC... Using selectWindow method, pop-up window will be selected and windowFocus method will let the control from current window to pop-up window and perform some actions according to our script..

10) Which method will you use for mouse left click and right click ?

A)    For mouse left click i use 'click' method and for right click i use 'keyDown' method followed by 'click' and 'keyUp' methods i.e 'keyDown' method will press 'control' key without releasing it yet and then click method will be executed, after that 'keyUp' method will release the 'control' key..... Code will be as follows..
          left click      --->  selenium.click(locator)
          right click  --->  selenium.keyDown(locator,keysequence)
selenium.click(locator)
selenium.keyUp(locator,keysequence)
NOTE : Here, all the three locators belong to same element/object and keysequence will be ASCII value for 'control' key...
11) What is the use of 'chooseOkOnNextConfirmation()' ?
A)    This command is used to select/click 'OK' button in the confirmation box and it must be placed before the occurrence of confirmation box...  
12) What is a framework and what are the frameworks available in RC ?
A)    Framework is nothing but a structure that allows us to do things better and faster... It is a collection of libraries and classes and they are very helpful if testers want to automate test cases.. JUnit, NUnit, TestNG, Bromine, RSpec, unittest are some of the frameworks available in RC ..
13) How do you handle secured connection error in HTTPS ?
A)    Create an object to 'RemoteControlConfiguration' class, set 'TrustAllCertificate' flag to true and then pass remotecontrolcofiguration instance to SeleniumServer. i.e.
RemoteControlConfiguration r= new RemoteControlConfiguration();
r.setTrustAllCertificate(true);
SeleniumServer s=new SeleniumServer(r);
14) If the default port of selenium is busy then which port you will use ?
A)    We can use any port number which is valid.. First create an object to remote control configuration. Use 'setPort' method and provide valid port number(4545,5555,5655, etc).. There after attach this remote control configuration object to selenium server..i.e
RemoteControlConfiguration r= new RemoteControlConfiguration();
r.setPort(4567);
SeleniumServer s= new SeleniumServer(r);
15) How do you select second value from a drop down menu ?
A)   Define an array of string type.. By using 'getSelectOptions' command provide locator for that particular drop down and then use 'select' command.. As 'select' command parameters are locator and the label, in-place of label, define array index... i.e,.
String a[]=selenium.getSelectOptions(locator of drop down);
selenium.select("locator of drop down", a[1]);
note: If you want to select 5th value from drop down, then provide '4' in the index of an array because array index starts from 'zero'...
16) What is the difference between sleep() and setSpeed() methods ?
A)    Both will delay the speed of execution... When you use Thread.sleep(), then the execution of your test will be stopped until the time you have provided in sleep method, it will wait only once where the command is used where as using setSpeed() method we can set the time of delay which will follow each and every selenium command i.e if you set 5000 milliseconds then your test execution will wait 5 seconds after each and every selenium operation