Saturday, October 31, 2015

WebDriver Interview Questions - III


  1. How do you handle JavaScript alert using WebDriver?
    Answer : It can be handled using alert interface. Refer this post for further details.


  2. What is implicitwait & explicitwait?
    Answer: Implicit waits are basically your way of telling WebDriver the latency that you want to see if specified web element is not present that WebDriver looking for.

    Explicit waits are intelligent waits that are confined to a particular web element. Using explicit waits you are basically telling  WebDriver at the max it is to wait for X units of time before it gives up.
       Refer this post


  3. Can I navigate browser forward & backward?
    Answer : Yes, we can. Using methods available in Navigate interface we can navigate back and forth in a page.
       Refer this post

  4. How about handling iframes?
    Answer : We must switch the control to iframe before doing any operation with the elements within iframe. We can use switchTo method to switch the control to frame.
    • driver.switchTo().frame("<frame name>");
    • driver.switchTo().frame(frame index);
    • driver.switchTo().frame(<WebElement>);

  5. How to handle new windows?
    Answer : Refer this post

  6. Can we execute JavaScript using WebDriver?
    Answer : Yes, we can. Refer this post

  7. How can you perform mouse operations using WebDriver?
    Answer :  Refer this post

  8. How can I check for an element presence?
    Answer : Refer this - Method-I , Method- II

  9. How do you select options from dropdown?
    Answer : Refer this post

  10. Can we capture screenshot when case failed?
    Answer : Yes, we can take screenshot. Refer this post

Related Topics
WebDriver Interview Question - I
WebDriver Interview Question - II



No comments:

Post a Comment

Note: Only a member of this blog may post a comment.