Thursday 19 December 2013

100 Selenium Interview Questions

100 Selenium Interview Questions
  
 1.  Difference between Absolute path & Relative path.
Absolute path will start with root path (/) and Relative path will from current path (//)

2.  Tell me some TestNG Annotations.
@Test,@Parameters,@Listeners,@BeforeSuite,@AfterSuite,@BeforeTest,@AfterTest,
@DataProvider,@BeforeGroups,@AfterGroups,@BeforeClass,@AfterClass,
@BeforeMethod,@AfterMethod,@Factory

3.  What are desiredcapabilities?
Desired Capabilities help to set properties for the Web Driver. A typical use case would be to 
set the path for the Firefox Driver if your local installation doesn't correspond to the default 
settings.

4.  Difference between Selenium RC and Selenium
 Web driver.

5.  Difference between Web driver listener and
 TestNG Listener.
TestNG and Web driver Listener have different interfaces to implement and call them. They both 
modify respective behaviour. You can use Listeners in Annotation. Below 2 URL gives the
 detailed  list of listener and their interfaces.


6. Describe your framework.


7.  Which is the best way to locate an element?

8.  Why we refer Firefox driver to the web driver
 inheritance. 

9.  What are the features of TestNG?
TestNG is a testing framework designed to simplify a broad range of testing needs, from 
unit testing (testing a class in isolation of the others) to integration testing (testing entire 
systems made of several classes, several packages and even several external frameworks,
 such as application servers). You can use test suite,annotations, automatically generation
 of report and much more.

10.   What is the difference between thread.Sleep()
 and selenium. Set Speed ("2000")?

11.   In what situation selenium finding element 
get fails?
·         Element loading issue
·         Dynamic id of web element

12.   What is the difference between "GET" and
"NAVIGATE" to open a web page in selenium 
web driver?
Get method will get a page to load or get page source or get text that's all whereas navigate
 will guide  through the history like refresh, back, forward.For example if we want to move 
forward and do some functionality and back to the home page this can be achieved 
through navigate() only. driver.get will wait  till the whole page gets loaded and driver.navigate 
will just redirect to that page and will not wait

13.   Please tell me the difference b/w implicitly 
Wait and Explicit wait.

14.   How we can retrieve the dynamically changing 
Ids? When we login Facebook the login label's id 
changes dynamically thus resulting in failure.
We have a hierarchy of locators and Facebook Is dynamic in nature,so we are not able to 
use "id" for  identification for after that we have remaining 7 locator's for that :2. xpath ()..
3. name..4. css.. 5. link text.. 6. partiallinktext...7.tag name. so u can use any one for
 identifying it. Most probably u can use "xpath" or  "css-locator" and if there r tag then 
link text or partial-link text. it depend on u . But we never use id's in Ajax application
 because it’s not possible.

15.What is the difference between driver.Close()
 and driver.Quit () method?
Close() - It is used to close the browser or page currently which is having the focus.
Quit() - It is used to shut down the web driver instance or destroy the web driver instance
(Close all the windows)

16.   How to scroll web element?--not browser—

17.   What is the basic use of Firefox profiles and 
how can we use them using selenium?
A profile in Firefox is a collection of bookmarks, browser settings, extensions, passwords, 
and history; in short, all of your personal settings.
We use them to change user agent, changing default download directory, changing versions etc.

18.   Customize the name of file going to be 
downloaded?
You have to download AUTO IT.exe file and has to be install
and later you have create .au3 file (in this file you have to specify the commands in
 VB script  like your file  name, where have to save, it will be easy may be 3 or 4 steps ) 
using AUTOIT...then right click the .au3 file you have to compile ....after that you will 
get the .exe file with the name of .au3 file ..In eclipse you will give the code like this
<----ProcessBuildder ps = new ProcessBuilder("path of the .exe file of au3") .start();--->


19.   How to handle internationalisation through
 web driver?
FirefoxProfile profile = new FirefoxProfile();
profile.set Preference("intl.accept_languages","jp");
Web driver driver = new FirefoxDriver(profile); driver.get(google.com) will open google in 
Japanese Lang

20.   How to overcome same origin policy through 
web driver?
·         Proxy server.
DesiredCapabilities capability=new DesiredCapabilities.firefox();
capability.setCapability(CapabilityType.PROXY,"your desire proxy")
WebDriver driver=new FirefoxDriver(capability);

21. How to put text in Facebook search box using 
selenium web driver.
·         driver.findElement(By.xpath("//div[contains(@class, '_586i')]")).sendKeys("abc");


22. Difference between flex and flash application.
In flash there is no code just based on creativity(design) we will complete the 
work(time consuming process) whereas flex contain some small functions 
which is integrated with mxml,PHP..(no tool is there to develop
 flex we want to use the properties of css and style sheet)

23. What is Error Collector in TestNG? 
What is its use?
This class allows the collection of errors during the process of retrieving the 
test data for the test method parameters


24. How can we get the font size, font color, 
font type used  for a particular text on a web
page using Selenium web driver?
driver.findelement(By.Xpath("Xpath ").getcssvalue("font-size);
driver.findelement(By.Xpath("Xpath ").getcssvalue("font-colour);
driver.findelement(By.Xpath("Xpath ").getcssvalue("font-type);
driver.findelement(By.Xpath("Xpath ").getcssvalue("background-colour);

25. How to run tests in multiple browser parallel?
 Is there  any other option other than selenium grid?

26. How to prepare Customized html Report using
 TestNG  in hybrid framework.
Below are the 3 ways:
• Junit: with the help of ANT.
• TestNG: using inbuilt default.html to get the HTML report. Also XST reports from ANT,
Selenium, TestNG combination.
• Using our own customized reports using XSL jar for converting XML content to HTML.

27. “What’s the hierarchy of TestNG annotations? 
Explain me about annotation hierarchy & execution
 order?

28. How the TestNG interacts with Selenium Core?
Explain me steps and internal architecture?"

29. Is it possible test web services using selenium?
Using Jmeter we can test how one website is talking to each other means time taken to 
send data, feeds, messages from one website to other website. Jmeter does a nice job 
of doubling for performance and api tests.

30. How to refresh a page without using context 
click?
1.Using sendKeys.Keys method
2.Using navigate.refresh() method
3.Using navigate.refresh() method
4.Using get() method
5.Using sendKeys() method

31. Can u send a code for printing in selenium?
There are two cases:
Case1. Any hyperlink/button on a web page, n clicking that link/button a print dialog box 
opens. (Performing an action on web page)
Case2.or do u want to open print dialog box within ur own script, not by performing any 
action on web page.
So If Case 1: just a call for WebElement.click() event will work to open it.
If Case 2: Call a Printer Job object (Use Awt API).
For code: Google it.

32. How to find broken images in a page using 
Selenium Web driver.
1. Get xpath and then using tag name; get all the links in the page
2. Click on each and every link in the page
3. In the target page title, look for 404/500 error.

33. How to handle Ajax popup window?
By using getWindowHandles() and obj.switchTo.window(windowid) we can handle popups using 
explicit wait and driver.swtchT0.window("name") commands for your requirements.

34. How to handle auto complete box in web driver?
By typing in box and capturing list elements

35. How to get the name of browser using Web Driver?

36. How to handle colors in web driver?
Use getCssValue(arg0) function to get the colors by sending 'color' string as an argument.
Example
String col = driver.findElement(By.id(locator)).getCssValue("color");

37. How to pass parameters from testng.xml into
 test case.

38. How to get text from captcha image??
driver.findElement(By.xpath(".//*[@id='SkipCaptcha']")).click();
String attr = ie.findElement(By.xpath(".//*[@id='SkipCaptcha']")).getAttribute("value");
System.out.println("The value of the attribute 'Name' is " + attr);

39. Is there a way to click hidden LINK in web driver?
String Block1 = driver.findElement(By.id("element ID"));
JavascriptExecutor js1=(JavascriptExecutor)driver;
js1.executeScript("$("+Block1+").css({'display':'block'});");

40. What Class Extends Web Driver?
·   AndroidDriver, ChromeDriver, EventFiringWebDriver, FirefoxDriver, HtmlUnitDriver, 
InternetExplorerDriver, IPhoneDriver, PhantomJSDriver, RemoteWebDriver, SafariDriver

41. What are the APIs that support Web Driver?
·         API are  nothing but collection of all selenium commands for Locating UI Elements 
(WebElements),Fetching a Page,User Input  etc…

42. How to disable cookies in browser.
·         Using deleteAllVisibleCookies() in selenium

43. "We have heard about frameworks well it can be
 broadly classified into these TDD, BDD and ATDD frameworks .What’s the Difference?"

44. How to change user agent in Firefox by selenium
 web driver.
FirefoxProfile profile = new FirefoxProfile();
profile.setPreference("general.useragent.override", "some UA string");
Web Driver driver = new FirefoxDriver(profile);

45. What is Selenese?
Selenese is HTML language based command, which is used in Selenium IDE.

46. Differences between QTP and selenium.

47. What is the MOST challenging test problem in my 
career in Automation?
In my career
·         Changing XPATHS' between testing server and production server-by keeping generic xpath
·         Keep separate property files for production and UAT
·         automating flash apps
·         Mobile Automation

48. “Suppose developer changed the existing image to 
new image with same xpath. Is test case pass or fail?"
·         Pass

49. How to handle network latency using selenium? 
·         Using driver.manage.pageLoadingtime for network latency

50. How does u handle dynamic elements without using
 xpath (with example?)
·         By using classname or css.

51. What are the different types of driver implementation?
·         AndroidDriver, AndroidWebDriver, ChromeDriver, EventFiringWebDriver, FirefoxDriver, HtmlUnitDriver, InternetExplorerDriver, IPhoneDriver, IPhoneSimulatorDriver, RemoteWebDriver, SafariDriver, WebDriverBackedSelenium

52. Code for Opening Firefox browser?
·         Webdriver driver=new FireFoxdriver();

53. Which repository you have used to store the test
 scripts?
I have created scripts in excel file and store them in Test cases folder under src .

54. How to work with radio button in web driver?

55. How to work with dynamic web table?
You can get the total number of <tr> tags within a <td> tag by giving the xpath of the
 <td> element by using  this function -
List<WebElement> ele = driver.findElements(By.xpath("Xpath of the table"));
Now you can use a for each loop to loop through each of the <tr> tags in the above list 
and then read each  value by using getText() method.

56. Detail about TestNG Test Output folder.
It is the directory where reports are generated. Every time tests run in a suite, TestNG 
creates index.html and  other files in the output directory.

57. In frame if no frame Id as well as no frame
 name then which attribute I should consider 
throughout our script.
You can go like this.....driver.findElements(By.xpath("//iframe"))...
Then it will return List of frames then switch to each and every frame and search for
 the locator which you want then break the loop

58. What is object repository?
It is collection of object names their properties, attributes and their values .It maye be
 excel, XML,property file or text file

59. TestNG vs. Junit?

60. What is the difference between @before 
method and @beforeclass.
In JUnit4 @Before is used to execute set of preconditions before executing a test. 
 For example, if there is a need to open some application and create a user before 
executing a test, then this annotation can be used for that method.  Method that is 
marked with @Before will be executed before executing every test in the class.
If a JUnit test case class contains lot of tests which all together need a method 
which sets up a precondition  and that needs to be executed before executing the 
Test Case class then we can utilise “@BeforeClass” annotation.

61. What are the different Parameters for @Test 
annotation? 
Parameters are keywords that modify the annotation’s function.

62. Can we run group of test cases using TestNG?
Test cases in group in Selenium using TestNG will be executed with the below options.
 If you want to execute the test cases based on one of the group like regression test or smoke test
 @Test(groups = {"regressiontest", "smoketest"})


63. Differences between Selenium web driver, 
IDE and RC?

64. How to highlight an object like qtp/uft does 
through selenium and java?

65. What are the different assertions in SIDE?
Assertions are like Assessors, but they verify that the state of the application conforms
 to what is expected. Examples include "make sure the page title is X" and "verify that this
 check box is checked".

66. How to store a value which is text box using 
web driver?
driver.findElement(By.id("your Textbox")).sendKeys("your keyword");

67. How to handle alerts and confirmation boxes.
Confirmation boxes and Alerts are handled in same way in selenium.
var alert = driver.switchTo().alert();
alert.dismiss();  //Click Cancel or Close window operation
alert.accept();   //Click OK
Handle Confirmation boxes via JavaScript,
driver.executeScript("window.confirm = function(message){return true;};");

68. How to mouse hover on an element?
Actions action = new Actions(webdriver);
WebElement we = webdriver.findElement(By.xpath("html/body/div[13]/ul/li[4]/a"));
action.moveToElement(we).moveToElement(webdriver.findElement(By.xpath("/expression-here"))).click().build().perform();

69. How to switch between the windows?
private void handlingMultipleWindows(String windowTitle) {
            Set<String> windows = driver.getWindowHandles();
            for (String window : windows) {
                driver.switchTo().window(window);
                if (driver.getTitle().contains(windowTitle)) {   return;   }     }     }


70. How to switch between frames?

71. What is actions class in web driver?
Actions class with web Driver help is Sliding element, Resizing an Element, Drag & Drop,
hovering a mouse, especially in a case when dealing with mouse over menus.

72. Difference between the selenium1.0 and 
selenium 2.0?
Selenium 1 = Selenium Remote Control.
Selenium 2 = Selenium Web driver, which combines elements of Selenium 1 and Web driver.

73. Difference between find element () and 
findelements ()?
findElement() :
Find the first element within the current page using the given "locating mechanism".
Returns a single WebElement.
findElements() :
Find all elements within the current page using the given "locating mechanism".
Returns List of Web Elements.

74. How to take the screen shots in seelnium2.0?


75. What is the default time for selenium Ide and 
webdriver?
Default timeout in selenium ide is 30 seconds.
For web driver go to below URL:


76. Write down scenarios which we can't automate?
Barcode Reader, Captcha etc.

77. In TestNG I have some test's  Test1-Test2-
Test3-Test4-Test5I want to run my execution 
order is Test5-Test1-Test3-Test2-Test4.How 
do you set the execution order can you explain 
for that?
·         Use priority parameter in @test annotation or TestNG annotations.

78. Differences between jxl and ApachePOI.
·         jxl does not support  XLSX files
·         jxl exerts less load on memory as compared to ApachePOI
·         jxl doesn't support rich text formatting while ApachePOI does.
·         jxl has not been maintained properly while ApachePOI is more up to date.
·         Sample code on Apache POI is easily available as compare to jxl.


79. How to ZIP files in Selenium with an Example?

80. What is default port no?
4444

81. If Default port no is busy how to change port no?
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);

82. Does Selenium support https protocols?
Yes
83. Majorly asked test scenario with framework in 
Interviews?
Majorly asked are:
·         Login for Gmail scenario
·         Goggle search and finding no of results
·         Downloading a file and save it
·         Checking mails and deleting them
·         Do shopping in flipkart.com

84. Selenium support mobile applications?
No, it is browser automation tool, it only automates Websites opening in mobile browser, and mobile APPs
 can't be automated.

85. What is wraps Driver?
For casting selenium instance to selenium2 (webdriver). wraps driver is used.
For more details.

86. Can you explain Junit Annotation? If there are 
1000 test cases. 500 test cases are executed. How
 will you execute the rest of the test cases by using annotation?"
The annotations generated with JUnit 4 tests in Selenium are:
 1. @Before public void method() - Will perform the method() before each test. This method
 can prepare the  test
 2. @Test public void method() - Annotation @Test identifies that this method is a test 
method.environment,e.g. read input data, initialize the class)
 3. @After public void method() - Test method must start with test@Before - this annotation
 is used for  executing a method before

87. Difference between assert and verify in selenium
 web driver.
·         When an “assert” fails, the test will be aborted. Assert is best used when the
 check value has to pass for  the test to be able to continue to run log in.
·         Where if a “verify” fails, the test will continue executing and logging the failure. 
Verify is best used to  check non critical things. Like the presence of a
 headline element.

88. "I want to find the location of ""b"" in the below
 code, how can I find out without using xpath, name,
 id, csslocator, index.<div>
<Button>a</button>
<Button>b</button>
<Button>c</button>
</div>
    ·      driver.findElement(By.xpath("//*[contains(text(),'b')]")).click(); or
·        //div/button[contains(text(),'b']
·      

89. How to do Applet testing using selenium? 
Please see below URLs:

90.  Name 5 different exceptions you had in 
selenium web driver and mention what instance 
you got it and how do you resolve it?
·         WebDriverException
·         NoAlertPresentException
·         NoSuchWindowException
·         NoSuchElementException
·         TimeoutException

91. How do you manage the code versions in 
your project?
·         Using SVN or other versioning tools 

92. Latest version of Firefox and selenium in 
market and the version on which you are testing
 which you are testing.
·         FF Latest version till Dec,2013 for windows7,64 bit :26.0.I use FF 25.0.1 (ur ans. may differ)
·         Selenium web driver latest version till dec,2013- 2.39.0 I use selenium 2.37 see latest at
           http://www.seleniumhq.org/download/

93. How to know all the methods supported in 
web driver 
and its syntax. 
·         In Org.openqa.selenium package, web driver interface has all the main methods that can
be used in Selenium Web driver

94. How do you create html test report from 
your test script? 
• I would see below 3 ways:
• Junit: with the help of ANT.
• TestNG: using inbuilt default.html to get the HTML report. Also XLST reports from ANT,
Selenium, TestNG combination.
• Using our own customized reports using XSL jar for converting XML content to HTML.

95. List the browsers, OS supported by the Selenium
Windows Linux Mac
IE Y NA NA
FF Y Y Y
Safari Y N Y
Opera Y Y Y
Chrome Y Y Y

96. Can you explain Selenium Mobile Automation?

97. What mobile devices it may Support?
Selenium Web driver supports all the mobile devices operating on Android, IOS operating Systems
·         Android – for phones and tablets (devices & emulators)
·         iOS for phones (devices & emulators) and for tablets (devices & emulators)


98. What is the difference between single and
 double slash
 in Xpath?

99. What are the test types supported by Selenium?
Selenium supports UI and functional testing. As well it can support performance testing
for reasonable load using selenium grid.

100. In what all case we have to go for 
“JavaScript executor”.
Consider FB main page after you login. When u scrolls down, the updates get loaded. To
 handle this activity, there is no selenium command. So you can go for javascript to set 
the scroll down value like driver.executeScript("window.scrollBy(0,200)", "");


236 comments:

  1. Thannks Ruchi for Questions!!

    Please also publish answers for these question:-)

    ~Harish

    ReplyDelete
    Replies
    1. I18N is not working fine will u please explain detailed Tanks

      Delete
    2. I appreciate you work Ruchi.. Very good work..

      Delete
    3. thank you very much dude...

      Delete
  2. Answer1: Absolute path contains full name of file including the source, for instance, c:\Windows\Temp\log.txt. Relative path contains only the path relativaly to a certain folder, for instance, relative path of log.txt relativaly to the folder Windows is Temp\log.txt.

    ReplyDelete
    Replies
    1. This answer was more clear to understand.thanks sandeep

      Delete
  3. As Promised Most of the answers are posted, remianing will be done asap.

    ReplyDelete
    Replies
    1. if u could give few more details on reports it would be better.
      thanks neway, this doc is very helpfull.:) thumbs up..!

      Delete
    2. Thanks alot ruchi goyal.your help is really contributing to many careers.

      Delete
  4. Thanks ruchi thanks a lot it is very usefull block for us....thanks a lot.

    ReplyDelete
  5. Thanks for posting the Q/A. Excellent blog for interview Q/A

    ReplyDelete
  6. Thanks ruchi ,its very helpful.I m new in new selenium , I have some question. I will post you .plz guide me..

    ReplyDelete
    Replies
    1. Thanks all of you .abhishke,Please post questions.

      Delete
  7. 88 ans is wrong please correct it , you have mentioned without using xpath but u are using xpath

    ReplyDelete
    Replies
    1. Please tell me correct answer..

      Delete
    2. As per my knowledge, In webdriver we can locate elements using XPath, ID, Name, CSS selector, link or partial link text, tag name and class name. Please correct me if i am missing any. Here is examples with list http://software-testing-tutorials-automation.blogspot.in/search/label/Webdriver%20Element%20Locators

      Delete
    3. Hello,
      You can locate it using jQuery selectors and than evaluate that jquery code.
      $("Button:contains('b')") .

      Delete
  8. Thanks Ruchi for the valuable stuff,keep updating this with new questions

    ReplyDelete
  9. Thnx Ruchi u are doing an excelent job yar thnx for qstn n answr??

    ReplyDelete
  10. Nice Effort...Thanks a lot ....Keep going...

    ReplyDelete
  11. Thanks Ruchi for combining all the pieces and putting at one place..Really good stuff..Keep updating ...

    ReplyDelete
  12. Thanks ruchi ,its very helpful..

    ReplyDelete
  13. Thanks ruchi ,its very helpful..

    ReplyDelete
  14. Thank you Ruchi...you are helping out a lot of people like me....

    ReplyDelete
  15. Hi ruchi... can you explain in detail internationalization... its not working what u explained in the blog.

    ReplyDelete
  16. excellent job...Thanks for sharing all these questions

    ReplyDelete
  17. All-
    I am facing a problem while identifying the object . Application is developed on Oracle ADF technology. I tried in different type like (id, name , class name, xpath and css) but could not able to find the solution . Can any one help me regarding this one.
    Here is the sample code.







    ABC






    tag arevnot accepting so i added s for all tags

    ReplyDelete
  18. Thanks a lot !!!!!!!

    ReplyDelete
  19. Thanks a lot RUCHI for the update.

    Plz keep updating the details.

    ReplyDelete
  20. Thanks ruchi thanks a lot it is very usefull block for us....thanks a lot.

    ReplyDelete
  21. hi rushi,
    no need to contains function for identify the "b" in 88 qus. text() function enf

    ReplyDelete
  22. In selenium RC, we can get table row element index using getElementIndex() method .

    how we get element index in web driver.
    I use this method but return value as "-1"

    int g= driver.findElements(By.xpath("//html/body/form/div[3]/div[2]/table/tbody/tr/td/div/div[3]/div[2]/table/tbody//tr")).indexOf(Columnvalue);

    Please give solution for this problem.

    ReplyDelete
  23. In selenium RC, we can get table row element index using getElementIndex() method .

    how we get element index in web driver.
    I use this method but return value as "-1"

    int g= driver.findElements(By.xpath("//html/body/form/div[3]/div[2]/table/tbody/tr/td/div/div[3]/div[2]/table/tbody//tr")).indexOf(Columnvalue);

    Please give solution for this problem.

    ReplyDelete
  24. good information
    90% of information is asking in interviews
    thanx

    ReplyDelete
  25. Hi Ruchi,
    Nice work.
    Can you share some knowledge on handling iFrames?

    ReplyDelete
    Replies
    1. you have to switch to a iframe to go into that iframe to get the information from it.It is as same as the simulation of iframe in to the new tab of the browser.

      Delete
  26. Thanks Ruchi....This blog helped a lot...

    ReplyDelete
  27. Hi,

    Could you please describe architecture of webdriver.

    Thanks!

    ReplyDelete
  28. Hi,

    Thanks for your useful information. it is very helpful for the people who wants to strong in selenium automation.

    Thanks,
    Srividya

    ReplyDelete
  29. This comment has been removed by the author.

    ReplyDelete
  30. hi Ruchi,

    thank u for giving the valuable information about Selenium FAQ's.

    ReplyDelete
  31. Efforts appreciated. Thanks!!!

    ReplyDelete
  32. Hi Ruchi ,

    can share info about
    1.file upload (with out using third party tool)
    2.file Download ? And i need to verify whether file is downloaded or not.
    3.How to integrate Qc with selenium
    4.where sql comes into picture selenium .Give me example ?
    5.If i have multiple windows ,i need to switch particular window and do some action ? How ? with example .

    ReplyDelete
    Replies
    1. Hello Ravi,
      1) File upload. For sure you will have to deal with a file chooser.
      You will have to set the path for your doc and than just use sendkeys ( path )
      2) File downloader : create a list with the files from a path. Create a loop for the files( currentfiles-initialfiles) > 0 than your file was downloaded.
      3) don't know
      4) SQL with selenium. For example you insert one data into a table via form.
      You want to make sure if the data was correctly inserted.
      You can do something like :
      assert dataFromSQL = dataFromSelenium

      Delete
  33. Great Job... Thanks for sharing the information

    ReplyDelete
  34. Hi Ruchi,
    this information is really helpful, thank you very much...

    ReplyDelete
  35. Hi Ruchi,
    this information is really helpful, thank you very much....

    ReplyDelete
  36. Thanks for sharing valuable information, and can you share info about "How to use same instance of the webdriver for the different tests in different classes?"

    ReplyDelete
  37. can we use same instance of the webdriver for the different tests in different classes

    ReplyDelete
    Replies
    1. You can use it but you might find out that something is f**** up.
      It's recommended to start every test in a different instances.
      Example: You run one test that fails and webdriver instance stops. The second test which relies on the same webdriver instance will sure fail.

      Delete
  38. Such a great article... Thanks a lot for posting..

    ReplyDelete
  39. This comment has been removed by a blog administrator.

    ReplyDelete
  40. Good Questions Thanks for Sharing

    ReplyDelete
  41. wonderful !!! very nicely done .. thanks

    ReplyDelete
  42. If an object is changing after every build ,how can u handle it through coding?

    ReplyDelete
  43. Hi Ruchi,
    I have an query regarding TestNG report which is index.html.Can you tell me whether this index.html can be stored on the local system in a specific location automatically?

    ReplyDelete
  44. Hi Ruchi,
    Can Index.html report file be saved to my local system to a specific location automatically??

    ReplyDelete
  45. Hi Ruchi,
    Can Index.html report file be saved to my local system to a specific location automatically??

    ReplyDelete
  46. For your kind information check with http://skillgun.comfor IT Technical interview questions

    ReplyDelete
  47. For your kind information check with http://skillgun.comfor IT Technical interview questions

    ReplyDelete
  48. hi Ruchi,

    i have 3 test cases ,but 2nd test case is fail,i need screenshot for 2nd test case only...i need code.plz answer that question.

    ReplyDelete
  49. Hi Ruchi,
    Congratulations for your work.
    I didn't have time to read all your posts but I will sure do this.
    PS: I have a wrapper over selenium with which I work every day. Speed is around 10-15 automated tests / 8 hours. with tests containing max 10 steps.
    Maybe we can share some ideas.
    Best regards,
    Senior Automation Engineer

    ReplyDelete
  50. Very useful information ...you maked my automation skills so strong ..liking to contribute my selft oo in this blog

    ReplyDelete
  51. Thanks a lot Ruchi......I don't follow any other website for selenium interview questions...But if you could post some more questions or discussion on frameworks,it would be a great help to all of us.
    Hats off to you

    ReplyDelete
  52. Nice collection Ruchi. I have a query regarding Q 19- How to handle internationalization through web driver?
    The code you provided simply opens Google in English language as usual. I can't understand the concept. It would be great if you explain more.

    ReplyDelete
  53. Hi ruchi

    can u please suggest some automation projects to keep in my resume
    It would be very helpful

    ReplyDelete
  54. Its really amazing Q&A , great job RUCHI. keep it up

    ReplyDelete
  55. Good information, for more interview questions on Selenium, you can visit http://www.gcreddy.com/2012/10/selenium-interview-questions.html

    ReplyDelete
  56. Excellent Post Ruchi !!!! Your question and answer on selenium automation tool will be useful for candidates attending interview. i recommend your blog to all my software testing professionals and students.
    Selenium training in Chennai

    ReplyDelete
  57. I want to know that how to find out xpath in selenium..

    ReplyDelete
    Replies
    1. with the help of FIreBug you can find the xpath in selenium

      Delete
  58. Hi Ruchi,

    Please let me know what is the difference between FirefoxDriver and FirefoxProfile?

    ReplyDelete
  59. please explain javascript executor?

    ReplyDelete
  60. Good information on Selenium automation testing tools. Your article is very useful for students and software testers.

    ReplyDelete
  61. @Ruchi : Very good Ans of Question no 78 :

    Perhaps the most significant difference is that Java JXL does not support the Excel 2007+ ".xlsx" format; it only supports the old BIFF (binary) ".xls" format. Apache POI supports both with a common design.
    Additionally, the Java portion of the JXL API was last updated in 2009 (3 years, 4 months ago as I write this), although it looks like there is a C# API. Apache POI is actively maintained.
    JXL doesn't support Conditional Formatting, Apache POI does, although this is not that significant, because you can conditionally format cells with your own code.
    JXL doesn't support rich text formatting, i.e. different formatting within a text string; Apache POI does support it.
    JXL only supports certain text rotations: horizontal/vertical, +/- 45 degrees, and stacked; Apache POI supports any integer number of degrees plus stacked.
    JXL doesn't support drawing shapes; Apache POI does.
    JXL supports most Page Setup settings such as Landscape/Portrait, Margins, Paper size, and Zoom. Apache POI supports all of that plus Repeating Rows and Columns.
    JXL doesn't support Split Panes; Apache POI does.
    JXL doesn't support Chart creation or manipulation; that support isn't there yet in Apache POI, but an API is slowly starting to form.
    Apache POI has a more extensive set of documentation and examples available than JXL.

    http://stackoverflow.com/questions/14980717/what-is-the-better-api-to-reading-excel-sheets-in-java-jxl-or-apache-poi

    ReplyDelete
  62. Hi ruchi really excellent post. I am new to selenium. Actually i need details of using ANT and Maven and sending htmlreport and snapshot through mail. Please can you share me the code or tell me some good references.

    ReplyDelete
  63. how to find out xpath in selenium?
    1:
    a:: place the cursor at particular element
    b:: right click,select the firebug
    c:: select the firebug and place the cursor at the particular element and click

    2:: Selecting Xpath Manually::
    a:: First check for the near class, ensure that class name is repeated only once
    Example:: finding the xpath for a Login button
    xpath:; //td[class='small']//tr//td//a

    ReplyDelete
  64. visit also this blog to find still more selenium interview questions

    http://seleniumtemporary.blogspot.com/2014/08/frequently-asking-selenium-interview.html

    ReplyDelete
  65. May I know the code for "Goggle search and finding no of results".

    ReplyDelete
  66. u can use firebug

    ReplyDelete
  67. how to handle chrome browser authentication in selenium webdriver

    ReplyDelete
  68. Very nicely compiled and presented...just adding on some more selenium interview questions - Selenium Interview Questions | ArtOfTesting.com

    ReplyDelete
  69. For Free help visit : http://www.way2automation.com/selenium-appium-forum.html

    ReplyDelete
  70. http://www.way2automation.com/selenium-appium-forum.html

    ReplyDelete
  71. information is very helpfull

    http://www.suntrainings.com/Selenium.html

    ReplyDelete
  72. Has this helped any one of you guys in interviews? I have an interview coming up next week is this expected?

    ReplyDelete
  73. Well done Ruchi!!! A very good list

    ReplyDelete
  74. Hey Ruchii.........I kept a Fake experience on Selenium of 1 year.........I need the interview questions to prepare on selenium for experienced one...............can u help me out.....my gmail id is sen.surya44@gmail.com

    ReplyDelete
  75. Hey Ruchii.........I kept a Fake experience on Selenium of 1 year.........I need the interview questions to prepare on selenium for experienced one...............can u help me out.....my gmail id is sen.surya44@gmail.com

    ReplyDelete
  76. If I want to run one application in selenium 5 times how you can run?

    ReplyDelete
  77. If I want to run one application in selenium 5 times how you can run?

    ReplyDelete
  78. Hi, I have a question, I need your help!

    String title = driver.findElement(
    By.xpath("//*[@id=\"leftside\"]/div[1]/div[2]/div[2]/a"))
    .getText();
    System.out.println(title);

    This code worked but when I get a japanese text, It returns me something like "??????", how can I fixed the problem? Thanks you very much!

    ReplyDelete
  79. Hi Ruchi, nice set of interview questions.

    Can you please help me answer the framework question ? From the scratch....architecture and everything about Framwork interview point of view answer. Pls waiting for your Reply. I have interview coming Wednesday 21st jan 2015.

    - hari

    ReplyDelete
  80. Hi Ruchi,

    Can you plz help in POM framework?

    ReplyDelete
  81. Thanks Ruchi. The questions are really helpful.

    @Ruchi. I think No-40 Question can corrected as "What Class Implements Web Driver?" instead of "What Class Extends Web Driver?". As Class can not extends Interface and WebDriver is a Interface. They can only be Implemented. I think its a Typo mistake. But it goods to be corrected. Please correct me, if am wrong.

    http://selenium.googlecode.com/git/docs/api/java/org/openqa/selenium/WebDriver.html

    ReplyDelete
  82. This Is An Excelent Site For Learning selenium.
    For Selenium Online Training Visit: http://www.onlinetrainingfromindia.com/selenium-online-training-from-india.php
    Or Contact: (91) 7207070872.

    ReplyDelete
  83. Excelent Site For Learing Selenium

    ReplyDelete
  84. hi Ruchi,


    i would like to ask regarding Question no.67.you were written like below code
    var alert = driver.switchTo().alert();
    alert.dismiss(); //Click Cancel or Close window operation
    alert.accept(); //Click OK

    there you should write instead of var as Alert right.why i am asking you most of the people read as you written over there. pls modify over there.

    Thanks,
    Kumar Pradeep

    ReplyDelete
  85. "Great Post Ruchi !!!! Your question and answer on selenium automation tool will be useful for candidates attending interview. Thanks for sharing, keep sharing. But I had found one better and effective E-learning website related to Selenium interview Q/A’s. I have gone through, and it’s more supportive of my career as well, I will share you a link just goes through that: Selenium Interview Q/A's
    "

    ReplyDelete
  86. Very good collection of question and answers thank you for sharing this useful article. Know more about Selenium Testining Training

    ReplyDelete
  87. Greens Technology's. the leading software Training & placement centre Chennai & (Adyar)
    oracle training in chennai

    ReplyDelete
  88. It is very useful information at my studies time, i really very impressed very well articles and worth information, i can remember more days that articles.

    Selenium Training in Chennai

    ReplyDelete
  89. Awesome post,
    very helpful for interviews. thanks for covering all the concepts.
    Please keep sharing..
    Selenium training in Chennai

    ReplyDelete
  90. Great efforts put it to find the list of questions useful for Selenium, Definitely will share the same to other forums.
    We are also one of the best sources to learn Selnium -Selenium training in Chennai | Best Selenium training institute in Chennai

    ReplyDelete
  91. This one is much helpful, Very clear explanation about the topic.

    Latest Update here: www.bestseleniumtraininginchennai.in

    ReplyDelete
  92. Selenium Tutorial:
    The Basics about Selenium - "A Portable Software Testing Framework "

    https://www.linkedin.com/pulse/selenium-beginning-jones-sathya?published=t
    #Selenium #Tutorial #Software #Testing #Basics #Beginners #Professionals #Learn

    ReplyDelete
  93. Nice set of interview question that will really help the people to crack selenium interviews.

    ReplyDelete
  94. Thanks for such awesome blog. Your article is very easy to understand, informative and provide complete overview about software testing. Please consider including rss feed in your website, so I get your recent post on my site.
    http://www.credosystemz.com/training-in-chennai/best-selenium-training-in-chennai/

    ReplyDelete
  95. Hey Ruchi, Great efforts put it to find the list of 100 Selenium Interview Questions, Definitely will share the same to other forums.
    We are also one of the best sources to learn Selnium -Selenium training in Chennai | Best Selenium training institute in Chennai

    ReplyDelete
  96. Thanks for sharing Selenium interview questions...
    It is very helpful, especially for beginners like me who are looking for new job opportunities.

    Please keep sharing more articles..
    No 1 Selenium Training Institute in Chennai

    ReplyDelete
  97. The biggest change in Selenium recently has been the inclusion of the WebDriver API. Driving a browser natively as a user would either locally or on a remote machine using the Selenium Server it marks a leap forward in terms of browser automation.

    ReplyDelete

  98. This is excellent information. It is amazing and wonderful to visit your site.Thanks for sharng this information,this is useful to me...
    Android Training in Chennai
    Ios Training in Chennai

    ReplyDelete
  99. very useful info, and please keep updating........
    Thanks

    ReplyDelete
  100. It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...
    Android Training in Chennai
    Ios Training in Chennai

    ReplyDelete

  101. Hello author,

    I found your blog while searching for the updates in Selenium WebDriver,I am happy to be here. Very useful content and also easily understandable providing.. Believe me I did wrote an post about selenium tutorials for beginners with reference of your blog.

    ReplyDelete
  102. Want to know if selenium is good for your career? Visit

    http://www.gyansetu.in/product/best-selenium-testing-training-in-gurgaon/

    ReplyDelete
  103. Hi there
    This person is copying your post word by word http://www.testingtreasure.com/p/selenium-interview-questions_20.html

    ReplyDelete
  104. You can find more selenium interview questions here : http://selenium-webdriver.com/java/selenium-interview-questions-1

    ReplyDelete
  105. Thanks for sharing your knowledge

    ReplyDelete
  106. This is one awesome blog article. Much thanks again selenium Online Training

    ReplyDelete
  107. Really very informative and creative contents. This concept is a good way to enhance the knowledge.thanks for sharing. please

    keep it up
    Automation Testing training in gurgaon.


    ReplyDelete
  108. I have read your blog its very attractive and impressive. I like your blog selenium Online Training

    ReplyDelete
  109. Terrific post however I was wondering if you could write a litte more on this topic?
    I'd be very thankful if you could elaborate a little bit further.
    Appreciate it!

    ReplyDelete

  110. The benefits of Selenium for Test Automation are immense. Amongst the many benefits, Selenium is an Open-Source tool and is easy to get started with for functional testing of web applications. Importantly, it enables record and playback for testing web applications and can run multiple scripts across various browsers. Selenium Training in Chennai

    ReplyDelete
  111. Thanks for providing such a wonderful information.• I believe there are many more pleasurable opportunities ahead for individuals that looked at your site.
    selenium training in chennai

    ReplyDelete
  112. Your good knowledge and kindness in playing with all the pieces were very useful. I don’t know what I would have done if I had not encountered such a step like this.
    uipath training in bangalore

    ReplyDelete
  113. I believe there are many more pleasurable opportunities ahead for individuals that looked at your site.

    Java Training Institute Bangalore

    ReplyDelete
  114. I simply wanted to write down a quick word to say thanks to you for those wonderful tips and hints you are showing on this site.
    Hadoop Training Institute In chennai

    ReplyDelete
  115. You did an outstanding job. All the questions are important to any interview. Thanks for your help.

    Selenium Training in Pune

    ReplyDelete
  116. Needed to compose you a very little word to thank you yet again regarding the nice suggestions you’ve contributed here.

    Hadoop Training in chennai

    ReplyDelete
  117. Thanks for this.such a wondeful post for the beginners who are looking for gaining knowledge.

    DevOps Training in Chennai

    ReplyDelete
  118. Nice article Thanks for sharing this article Wonderful information from this website Thanks !!!
    Embedded training in chennai | Embedded training centre in chennai

    ReplyDelete
  119. Thank you a lot for providing individuals with a very spectacular possibility to read critical reviews from this site...


    Embedded training in chennai | Embedded training centre in chennai | PLC Training institute in chennai

    ReplyDelete

  120. The benefits of Selenium for Test Automation are immense. Amongst the many benefits, Selenium is an Open-Source tool and is easy to get started with for functional testing of web applications. Importantly, it enables to record and playback for testing web applications and can run multiple scripts across various browsers. Selenium Training in Chennai

    ReplyDelete
  121. Nice blog and absolutely outstanding. You can do something much better but i still say this perfect.Keep trying for the best...

    Embedded training in chennai | Embedded training centre in chennai

    ReplyDelete
  122. The information which you have provided is very good. It is very useful who is looking for selenium Online Training Hyderabad

    ReplyDelete
  123. Useful Information, your blog is sharing unique information....
    Thanks for sharing!!!
    digital employee recruitment services
    advanced recruitment processing services

    ReplyDelete
  124. I am really happy with your blog because your article is very unique and powerful for new reader.
    Selenium Training in Chennai | Selenium Training in Bangalore | Selenium Training in Pune

    ReplyDelete
  125. I am really happy with your blog because your article is very unique and powerful for new reader.
    Selenium Training in Chennai | Selenium Training in Bangalore | Selenium Training in Pune

    ReplyDelete
  126. Really very happy to say,your post is very interesting to read.I never stop myself to say something about it.You’re doing a great job.Keep it up thank you
    Dot net training in chennai

    ReplyDelete
  127. hey this is nice post thanks for providing this

    ReplyDelete
  128. I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post.is article.
    click here
    Selenium Training in Chennai
    |
    Selenium Training in Bangalore

    ReplyDelete
  129. Nice Set of interview questions very helpful to crack interview
    thanks for sharing...
    Nice Explaination....
    for selenium interview question and answers
    Selenium Interview Questions

    ReplyDelete
  130. Hey there would yoᥙ mind stating which blog platform
    you'гe using? I'm looқing to start my own Ƅlog soon but I'm
    having a hard time making a decision between BlogEngine/Wordpress/B2evolutiⲟn and Drupal.
    The reaѕߋn I ask іs because your layout seems different then most blߋgs
    and I'm looking for something completely unique.
    P.S Sorry for getting off-topic but I had to aѕk!

    he said : Lеarn How To Lock Files From The Movies

    ReplyDelete
  131. My гelatives alwаys say that I am killing my time here at web,
    howeᴠеr I know I am getting know-how all
    the time bʏ reading ѕuch nice cоntent.
    his explanatіon : Тimes Are Changing: How To Password Protect
    Foⅼder New Skills

    ReplyDelete
  132. Selenium is one of the most popular automated testing tool used to automate various types of applications. Selenium is a package of several testing tools designed in a way for to support and encourage automation testing of functional aspects of web-based applications and a wide range of browsers and platforms and for the same reason, it is referred to as a Suite.
    Selenium Interview Questions and Answers

    ReplyDelete
  133. Nice blog.It was so informative and helpful.Thanks for sharing this article..Keep update..Training with placement in chennai
    Top selenium training institutes in chennai

    ReplyDelete
  134. Thanks for posting such a great article.you done a great job selenium Online Training Hyderabad

    ReplyDelete
  135. Nice blog has been shared by you. it will be really helpful to many peoples who are all working under the technology. Thank you for sharing this blog.
    fire and safety course in chennai

    ReplyDelete
  136. Amazing Article ! I have bookmarked this article page as i received good information from this. All the best for the upcoming articles. I will be waiting for your new articles. Thank You ! Kindly Visit Us @ Coimbatore Travels | Ooty Travels | Coimbatore Airport Taxi | Coimbatore taxi

    ReplyDelete
  137. I like you post.It is very usfull to all.
    In this post having more usefull information and improve our knowledge.Can you share more valuable information present Technology.
    Dot Net Training in Chennai
    Selenium Testing Training in Chennai
    Software Testing Training Institute in Chennai
    Core Java Training in Chennai
    PHP Course in Chennai

    ReplyDelete
  138. This is really fascinating, You're an overly skilled
    blogger. I have joined your feed and stay up for in search of more of
    your great post. Additionally, I have shared your site in my social networks

    ReplyDelete
  139. Nice post. I learn something totally new and
    challenging on blogs I stumbleupon on a daily basis.
    It will always be exciting to read through content from
    other authors and use something from their websites.

    ReplyDelete
  140. I like reading through a post that will make people think.
    Also, many thanks for allowing me to comment!

    ReplyDelete
  141. Good Post. I like your blog. Thanks for Sharing.....
    Selenium course in Noida

    ReplyDelete
  142. If you are going for best contents like myself, just visit this web page daily for the
    reason that it presents feature contents, thanks

    ReplyDelete
  143. I’m not that much of a internet reader to be honest but your sites really nice, keep it up!
    I'll go ahead and bookmark your site to come back in the future.
    All the best

    ReplyDelete
  144. Do you mind if I quote a couple of your articles as long as I provide
    credit and sources back to your weblog? My blog is in the exact same niche as
    yours and my visitors would genuinely benefit from some of the information you provide here.
    Please let me know if this ok with you. Thank you!

    ReplyDelete
  145. Good day! Do you know if they make any plugins to assist with SEO?
    I'm trying to get my blog to rank for some targeted keywords
    but I'm not seeing very good results. If
    you know of any please share. Thanks!

    ReplyDelete
  146. I'm truly enjoying the design and layout of your
    blog. It's a very easy on the eyes which makes it much more enjoyable for me
    to come here and visit more often. Did you hire out a designer to
    create your theme? Outstanding work!

    ReplyDelete
  147. I every time emailed this web site post page to all my friends, for
    the reason that if like to read it after that my friends will too.

    ReplyDelete
  148. Aw, this was a really good post. Finding the time and actual effort
    to create a great article… but what can I say… I
    procrastinate a whole lot and don't manage to get nearly anything done.

    ReplyDelete
  149. Currently it looks like Movable Type is the preferred blogging platform available right now.
    (from what I've read) Is that what you are using on your blog?

    ReplyDelete
  150. It's nearly impossible to find well-informed people for this subject, however, you seem like you know what you're
    talking about! Thanks

    ReplyDelete
  151. Hi there! I know this is kinda off topic but I was wondering if you knew
    where I could find a captcha plugin for my comment form?
    I'm using the same blog platform as yours and I'm having
    problems finding one? Thanks a lot!

    ReplyDelete
  152. Great post. I was checking continuously this blog and I'm impressed!
    Extremely helpful info specially the last part :) I care for such info much.

    I was seeking this particular info for a very long time.

    Thank you and good luck.

    ReplyDelete
  153. I have read a few excellent stuff here. Certainly value bookmarking for revisiting.

    I wonder how so much effort you place to make this sort of
    excellent informative web site.

    ReplyDelete
  154. Good day I am so excited I found your weblog, I really found you by mistake, while I was
    researching on Askjeeve for something else, Anyhow I am here now and would just like
    to say thanks for a marvelous post and a all
    round interesting blog (I also love the theme/design), I don't have time to look over it all at the moment but I have book-marked
    it and also included your RSS feeds, so when I have time I
    will be back to read much more, Please do keep up the excellent job.

    ReplyDelete
  155. You made some good points there. I looked on the internet for
    more info about the issue and found most individuals will go along with your views on this website.

    ReplyDelete
  156. Wow, incredible weblog format! How lengthy have you been running a blog for?
    you make running a blog look easy. The overall glance of your web site is excellent, let alone the content material!

    ReplyDelete