SlideShare une entreprise Scribd logo
1  sur  52
Top 50 Selenium Interview
Questions for SDET
By DevLabs Alliance
Visit us at: www.devlabsalliance.com
Email: training@devlabsalliance.com
Contact: +91 9717514555
Selenium Interview Questions for SDET
1. What is Selenium?
Selenium is an open-source automation testing tool used for testing the web applications.
It is an open-source tool means it does not require any licensing cost and can be used with
various browsers like Mozilla Firefox, internet Explorer, Google Chrome, Safari or Opera.
The test scripts for Selenium can be written in various programming languages like Java,
Python, C#, PHP, Ruby, Perl and .Net.
Selenium Interview Questions for SDET
2. What are the advantages of Selenium?
The advantages of Selenium are as follows:
• It is an open source tool.
• It supports multiple languages like Java, Python, Perl, C#, PHP, Ruby.
• It can operate and support across multiple Operating Systems like Windows, Mac,
Linux, Unix, etc.
• It provides support across multiple browsers like Internet Explorer, Google Chrome,
Mozilla Firefox, Opera, Safari,etc.
Selenium Interview Questions for SDET
3. What are the limitations of Selenium?
The limitations of Selenium are as follows:
• It does not support testing of mobile applications.
• It is used for testing only web applications.
• It cannot test Captcha and Barcode readers.
• Reports can’t be generated directly through it. For generating reports, additional tools
like TestNG or JUnit are used.
Selenium Interview Questions for SDET
4. What is Selenese?
Selenese is the language that is used to write test scripts in Selenium IDE.
Selenium Interview Questions for SDET
5. What are the different types of locators in Selenium?
The various locators in Selenium are as follows:
• Link text
• Partial Link Text
• Id
• Name
• Tag Name
• Class Name
• Xpath
• CSS Selector
Selenium Interview Questions for SDET
6. What is the difference between Assert and verify commands?
Assert and Verify both are used to check whether the given condition is true or false.
In Assert command, if any condition fails then the execution will stop, and no further test
steps will be executed.
But in Verify command, if any condition fails then the execution will not stop and all
further test steps will be executed.
Selenium Interview Questions for SDET
7. What is the difference between setSpeed() and sleep() method in
Selenium?
setSpeed() method is used to delay every Selenium operation.
eg. setSpeed(“5000”): It will stop the execution for 5 seconds.
sleep() method is used to delay only a single operation where it is written.
eg. sleep(5000): It will wait for 5 seconds.
Selenium Interview Questions for SDET
8. What is the use of Selenium Grid and how it works?
Selenium Grid is used to execute the same or different test scripts on various platforms
and browsers parallelly. This helps in testing the application in different environments
concurrently and hence saving the execution time.
Working of Selenium Grid:
Selenium Grid sent the tests to the hub(central server that controls the execution on
different machines). These tests are then redirected to Selenium Web driver, which launch
the browser and run the test.
Selenium Interview Questions for SDET
9. What is XPath?
XPath is called as XML Path. It is a syntax or language that provides a way to locate and
process the elements in XML documents.
It is used in Selenium to uniquely identify any element on a webpage using HTML DOM
structure.
Selenium Interview Questions for SDET
10. Explain Absolute and Relative XPath.
Absolute XPath: It is used to find the XPath directly by giving the exact path of the
element as described in HTML DOM structure.
If any change is done in the path of the element, then XPath will get fail. It begins with
single forward slash(/), means that you can select the element starting from the root
node.
Relative XPath: Relative XPath starts searching the matching element from anywhere in
the HTML DOM structure.
It begins with double forward slash(//), which means it can search the element anywhere
in the page.
Selenium Interview Questions for SDET
11. What is the syntax of XPath?
//tagName[@attributeName = ‘attributeValue’]
for eg.: //input[@id = ‘txtUserName’]
Selenium Interview Questions for SDET
12. What is the difference between findElement() and findElements()?
FindElement() returns only one Web Element.If there are more than 1 matches, then it
will return first appearance in DOM.
If there is no such element present in the DOM, then it will throw ElementNotFound
exception.
FindElements() returns the list of Web elements present in the webpage.
If there is no such element present, then it will return the empty list and will not throw
any exception.
Selenium Interview Questions for SDET
13. What is the difference between Implicit Wait and Explicit Wait?
Implicit Wait: It is used to tell Web driver to wait for some certain amount of time while
trying to find an element in DOM before throwing an exception.
It is applied on all Selenium commands.
Explicit Wait: It is used to tell the Web driver to wait for some extended amount of time
for some specific search or till the time some specific condition is met.
It is one-timer and is used for a particular search.
Selenium Interview Questions for SDET
14. What are the different Exceptions present in Selenium Web driver?
The various exceptions in Selenium Webdriver are as follows:
• NoSuchElementException
• ElementNotVisibleException
• TimeOutException
• NotFoundException
• SessionNotFoundException
Selenium Interview Questions for SDET
15. What are the different ways to refresh browser using Selenium?
The different ways to refresh the browser are:
• navigate.refresh()
• getCurrentURL()
• navigate.to(driver.getCurrentURL())
• sendKeys(Keys.F5)
Selenium Interview Questions for SDET
16. What are the different types of navigation commands?
The different types of navigation commands are:
• driver.navigate().to(Url)
• driver.navigate().forward()
• driver.navigate().refresh()
• driver.navigate().back()
Selenium Interview Questions for SDET
17. What are the different ways to select a value in a dropdown?
The different ways to select a value in a dropdown are:
• selectByVisibleText()
• selectByValue()
• selectByIndex()
Selenium Interview Questions for SDET
18. What is the difference between driver.close() and driver.quit()
commands?
driver.close() is used to close only the current window that IWebDriver is controlling
driver.quit() is used to close all the Windows opened by IWebDriver.
Selenium Interview Questions for SDET
19. What is Single Slash(/) and Double Slash(//) in XPath?
Single Slash is used in Absolute XPath and it instructs the XPath Search Engine to start
searching for element starting from the root node.
Double Slash is used in Relative XPath and it instructs the XPath Search Engine to search
for matching element anywhere in the XML document.
Selenium Interview Questions for SDET
20. How to use screen coordinates while using click command?
To click on any specific part of an element, clickAt command is used.
ClickAt command uses element locator and x,y co-ordinates as arguments-
clickAt(locator, coordString)
Selenium Interview Questions for SDET
21. How can you submit a form using Selenium?
submit() method on element is used to submit a form.
element.submit();
Selenium Interview Questions for SDET
22. How can you login in the site if it is showing any authentication pop-
up for username and password?
We can login by passing the username and password with URL:
http://username:password@url
Selenium Interview Questions for SDET
23. What is Object Repository?
Object Repository is used to store all the objects that are used in the scripts in one or
more centralized location rather than scattered all over the test script.
The main advantage of using Object repository is to segregate all objects in one place.
If any locator value of any web element changes, then change need to be done at only one
place i.e. object repository rather than making changes in all test cases where that
particular locator is used.
Selenium Interview Questions for SDET
24. How double click can be performed using Selenium Webdriver?
We can performed double click by using Actions class.
Actions act= new Actions(driver);
act.doubleClick(webElement);
Selenium Interview Questions for SDET
25. How to get a text of a web element?
getText() method is used to get the text of a web element.
string text= driver.findElement(by.id(“Text”)).getText();
Selenium Interview Questions for SDET
26. What are Soft Assert and Hard Assert in Selenium?
Soft Assert does not throw any exception if an assert statement fails and will continue to
next step in the test after the assert statement.
Hard Assert throws an AssertException if any assert statement fails and will not continue
with the further steps in the test.
Selenium Interview Questions for SDET
27. What is Selenium Webdriver?
Webdriver is an API that is easy to explore and understand and helps us to make tests
easier to read and maintain.
It is an interface that comes under org.openqa.selenium package of Selenium.
Selenium Interview Questions for SDET
28. Is Webdriver class or an Interface?
Webdriver is an interface and comes under the org.openqa.selenium package of Selenium
and a sub-interface of “SearchContext”.
Selenium Interview Questions for SDET
29. Name some interfaces in Webdriver Interface.
Some of the interfaces in Webdriver Interface are as follows:
• WebDriver.ImeHandler: An interface used for managing inputs.
• WebDriver.Navigation: An interface used for managing Page navigation.
• WebDriver.Options: An interface used for managing browser menu operations.
• WebDriver.TargetLocator: An interface used for locating frames and windows.
• WebDriver.Timeouts: An interface used for managing timeouts.
• WebDriver.Window: An interface used for managing window visualization.
Selenium Interview Questions for SDET
30. How to launch a browser using Selenium WebDriver?
Browser is launched by creating an object of a required driver class such as FirefoxDriver,
ChromeDriver, InternetExplorerDriver, etc.
Launching Chrome Driver:
WebDriver driver = new ChromeDriver();
Launching FireFox Driver:
WebDriver driver = new GeckoDriver();
Launching Internet Explorer Driver:
WebDriver driver = new InternetExplorerDriver();
Selenium Interview Questions for SDET
31. What is the super interface of WebDriver?
“SearchContext” is the super interface of WebDriver.
Selenium Interview Questions for SDET
32. What is frame and how can you switch between frames in Selenium?
Frame is a HTML document which is embedded inside HTML document.
To switch between frame, following Selenium command is used:
driver.switchTo().frame(By.tagName(“iFrame”));
Selenium Interview Questions for SDET
33. How can you switch back to main page from a frame?
defaultContent() method is used to switch back from a frame.
eg.: driver.switchTo().defaultContent();
Selenium Interview Questions for SDET
34. What are the various ways to switch between the frames?
The various ways to switch between frames are as follows:
• Switch to frame by Index: driver.switchTo().frame(0);
• Switch to Frame by Name: driver.switchTo().frame(“iframe”);
• Switch to Frame by Id: driver.switchTo().frame(“IF1”);
Selenium Interview Questions for SDET
35. How can you find total number of frames in a web-page?
size() method is used to find the total number of frames in a web-page.
Syntax:
List<WebElements> ListItems = driver.findElements(By.tagName(“iFrame”));
No. of Frames = ListItems.size();
Selenium Interview Questions for SDET
36. What is Select class in Selenium?
Select class is used to select the values in dropdown or multiselect.
Syntax:
Select abc = new Select(driver.FindElement(By.Id(“ ”)));
abc.SelectByVisibleText(“ “);
Selenium Interview Questions for SDET
37. How can you deselect any option from Multiselect?
To deselect any text from multiselect, deSelectByVisibleText() method is used.
Syntax:
abc.deSelectByVisibleText(“ “);
Selenium Interview Questions for SDET
38. How can you move to some element using Actions class?
To move any element, below Actions method is used:
WebElement abc = driver.FindElement(By.Id(“ “));
new Actions(driver).moveToElement(abc).perform;
Selenium Interview Questions for SDET
39. How to capture screenshots in Selenium?
To capture the screenshot, below code can be written:
File srcFile = ((RemoteWebDriver) driver).getScreenShotAs(OutputType.FILE);
File destFile = new file(“E:/screenshot.png”);
FileUtils.copyFile(srcFile, destFile);
Selenium Interview Questions for SDET
40. Can captcha and Barcode reader be automated using Selenium?
No, captcha and barcode reader can’t be automated using Selenium.
Selenium Interview Questions for SDET
41. Can Selenium Webdriver test Mobile applications?
No, Selenium Webdriver can’t test mobile applications.
Selenium Interview Questions for SDET
42. How to click on a hyperlink using linkText?
driver.findElement(By.linkText(“devLabsAlliance”)).click();
Selenium Interview Questions for SDET
43. How can you type in a textbox using Selenium?
sendKeys() method is used to type a string in a textbox.
Syntax:
WebElement user = driver.FindElement(By.Id(“usrName”));
user.sendKeys(“devLabs”);
Selenium Interview Questions for SDET
44. What are BreakPoints and StartPoints in Selenium?
BreakPoints: BreakPoint will stop the execution of code there only where it is inserted.
StartPoints: StartPoint is used to specify the point from where the execution should begin.
Selenium Interview Questions for SDET
45. What is the difference between getWindowHandles() and
getWindowHandle()?
getWindowHandles(): It returns the address of all the open windows initiated by driver.
Its return type is Set<String>.
getWindowHandle(): It returns the address of the current browser where the control is.
Its return type is string.
Selenium Interview Questions for SDET
46. What is Selenium framework?
A framework is a code structure which helps to make code understanding and
maintenance easy. With framework, we can place the code and data separately which
makes it easy to read and can be re-used as well.
Selenium Interview Questions for SDET
47. What are the different types of Selenium framework?
There are 3 types of Selenium framework:
• Data-driven Framework: In Data-driven framework, test- data is written in some
external files like Excel, csv or XML and that file is used for getting the test data.
• Keyword-driven Framework: In keyword-driven framework, all the operations and
instructions are written in some external file like Excel worksheet.
• Hybrid Framework: It takes the advantage of both Keyword driven and Data driven
framework.
Selenium Interview Questions for SDET
48. What is FluentWait in Selenium?
It defines the maximum amount of time to wait for a specific condition and frequency
before throwing an ElementNotVisibleException exception.
Fluent Wait have pooling capacity. It means that after this particular time, it can check if
application is loaded and then it can move further without waiting for max time.
Selenium Interview Questions for SDET
49. How can you get the text of alert pop-up in Selenium?
To get the text of alert pop-up, below statement is used:
driver.switchTo().alert().getText();
Selenium Interview Questions for SDET
50. How can you dismiss the alert pop-up in Selenium?
To dismiss the alert pop-up, below statement is used:
driver.switchTo().alert().dismiss();
Visit us at: www.devlabsalliance.com
Email: training@devlabsalliance.com
Contact: +91 9717514555

Contenu connexe

Tendances

Test Automation Strategy
Test Automation StrategyTest Automation Strategy
Test Automation StrategyMartin Ruddy
 
New trends in testing automation
New trends in testing automationNew trends in testing automation
New trends in testing automationEran Kinsbrunner
 
[기본과정] 코드 테스트와 커버리지 기본 교육(개념)
[기본과정] 코드 테스트와 커버리지 기본 교육(개념)[기본과정] 코드 테스트와 커버리지 기본 교육(개념)
[기본과정] 코드 테스트와 커버리지 기본 교육(개념)SangIn Choung
 
Test automation principles, terminologies and implementations
Test automation principles, terminologies and implementationsTest automation principles, terminologies and implementations
Test automation principles, terminologies and implementationsSteven Li
 
Software Testing Process, Testing Automation and Software Testing Trends
Software Testing Process, Testing Automation and Software Testing TrendsSoftware Testing Process, Testing Automation and Software Testing Trends
Software Testing Process, Testing Automation and Software Testing TrendsKMS Technology
 
SDET approach for Agile Testing
SDET approach for Agile TestingSDET approach for Agile Testing
SDET approach for Agile TestingGopikrishna Kannan
 
Agile QA and Testing process
Agile QA and Testing processAgile QA and Testing process
Agile QA and Testing processGloria Stoilova
 
Test Automation Best Practices (with SOA test approach)
Test Automation Best Practices (with SOA test approach)Test Automation Best Practices (with SOA test approach)
Test Automation Best Practices (with SOA test approach)Leonard Fingerman
 
How to select the right automated testing tool
How to select the right automated testing toolHow to select the right automated testing tool
How to select the right automated testing toolKatalon Studio
 
Developing a test automation strategy by Brian Bayer
Developing a test automation strategy by Brian BayerDeveloping a test automation strategy by Brian Bayer
Developing a test automation strategy by Brian BayerQA or the Highway
 
오픈 스펙을 대상으로 한 테스트설계사례
오픈 스펙을 대상으로 한 테스트설계사례오픈 스펙을 대상으로 한 테스트설계사례
오픈 스펙을 대상으로 한 테스트설계사례SangIn Choung
 
Sap test center of excellence
Sap test center of excellenceSap test center of excellence
Sap test center of excellenceInfosys
 
6 Traits of a Successful Test Automation Architecture
6 Traits of a Successful Test Automation Architecture6 Traits of a Successful Test Automation Architecture
6 Traits of a Successful Test Automation ArchitectureErdem YILDIRIM
 
Test Automation
Test AutomationTest Automation
Test Automationrockoder
 
Automate REST API Testing
Automate REST API TestingAutomate REST API Testing
Automate REST API TestingTechWell
 

Tendances (20)

Test Automation Strategy
Test Automation StrategyTest Automation Strategy
Test Automation Strategy
 
New trends in testing automation
New trends in testing automationNew trends in testing automation
New trends in testing automation
 
API Testing
API TestingAPI Testing
API Testing
 
[기본과정] 코드 테스트와 커버리지 기본 교육(개념)
[기본과정] 코드 테스트와 커버리지 기본 교육(개념)[기본과정] 코드 테스트와 커버리지 기본 교육(개념)
[기본과정] 코드 테스트와 커버리지 기본 교육(개념)
 
Test automation principles, terminologies and implementations
Test automation principles, terminologies and implementationsTest automation principles, terminologies and implementations
Test automation principles, terminologies and implementations
 
Software Testing Process, Testing Automation and Software Testing Trends
Software Testing Process, Testing Automation and Software Testing TrendsSoftware Testing Process, Testing Automation and Software Testing Trends
Software Testing Process, Testing Automation and Software Testing Trends
 
Test automation process
Test automation processTest automation process
Test automation process
 
SDET approach for Agile Testing
SDET approach for Agile TestingSDET approach for Agile Testing
SDET approach for Agile Testing
 
TCoE
TCoETCoE
TCoE
 
Agile QA and Testing process
Agile QA and Testing processAgile QA and Testing process
Agile QA and Testing process
 
Test Automation Best Practices (with SOA test approach)
Test Automation Best Practices (with SOA test approach)Test Automation Best Practices (with SOA test approach)
Test Automation Best Practices (with SOA test approach)
 
Api testing
Api testingApi testing
Api testing
 
Agile QA process
Agile QA processAgile QA process
Agile QA process
 
How to select the right automated testing tool
How to select the right automated testing toolHow to select the right automated testing tool
How to select the right automated testing tool
 
Developing a test automation strategy by Brian Bayer
Developing a test automation strategy by Brian BayerDeveloping a test automation strategy by Brian Bayer
Developing a test automation strategy by Brian Bayer
 
오픈 스펙을 대상으로 한 테스트설계사례
오픈 스펙을 대상으로 한 테스트설계사례오픈 스펙을 대상으로 한 테스트설계사례
오픈 스펙을 대상으로 한 테스트설계사례
 
Sap test center of excellence
Sap test center of excellenceSap test center of excellence
Sap test center of excellence
 
6 Traits of a Successful Test Automation Architecture
6 Traits of a Successful Test Automation Architecture6 Traits of a Successful Test Automation Architecture
6 Traits of a Successful Test Automation Architecture
 
Test Automation
Test AutomationTest Automation
Test Automation
 
Automate REST API Testing
Automate REST API TestingAutomate REST API Testing
Automate REST API Testing
 

Similaire à DevLabs Alliance Top 50 Selenium Interview Questions for SDET

Selenium Automation Testing Interview Questions And Answers
Selenium Automation Testing Interview Questions And AnswersSelenium Automation Testing Interview Questions And Answers
Selenium Automation Testing Interview Questions And AnswersAjit Jadhav
 
Selenium interview-questions-freshers
Selenium interview-questions-freshersSelenium interview-questions-freshers
Selenium interview-questions-freshersNaga Mani
 
Top 30 Selenium Interview Questions.pptx
Top 30 Selenium Interview Questions.pptxTop 30 Selenium Interview Questions.pptx
Top 30 Selenium Interview Questions.pptxSyntax Technologies
 
Selenium Webdriver Interview Questions
Selenium Webdriver Interview QuestionsSelenium Webdriver Interview Questions
Selenium Webdriver Interview QuestionsJai Singh
 
Selenium Interview Questions And Answers | Selenium Interview Questions | Sel...
Selenium Interview Questions And Answers | Selenium Interview Questions | Sel...Selenium Interview Questions And Answers | Selenium Interview Questions | Sel...
Selenium Interview Questions And Answers | Selenium Interview Questions | Sel...Simplilearn
 
Selenium interview questions
Selenium interview questionsSelenium interview questions
Selenium interview questionsgirichinna27
 
Interview question & Answers for 3+ years experienced in Selenium | LearningSlot
Interview question & Answers for 3+ years experienced in Selenium | LearningSlotInterview question & Answers for 3+ years experienced in Selenium | LearningSlot
Interview question & Answers for 3+ years experienced in Selenium | LearningSlotLearning Slot
 
25 Top Selenium Interview Questions and Answers for 2023.pdf
25 Top Selenium Interview Questions and Answers for 2023.pdf25 Top Selenium Interview Questions and Answers for 2023.pdf
25 Top Selenium Interview Questions and Answers for 2023.pdfAnanthReddy38
 
Interview Question & Answers for Selenium Freshers | LearningSlot
Interview Question & Answers for Selenium Freshers | LearningSlotInterview Question & Answers for Selenium Freshers | LearningSlot
Interview Question & Answers for Selenium Freshers | LearningSlotLearning Slot
 
selenium-webdriver-interview-questions.pdf
selenium-webdriver-interview-questions.pdfselenium-webdriver-interview-questions.pdf
selenium-webdriver-interview-questions.pdfAnuragMourya8
 
Seleniuminterviewquestions
Seleniuminterviewquestions Seleniuminterviewquestions
Seleniuminterviewquestions laxmiraj01
 
Selenium Interview Questions and Answers | Selenium Tutorial | Selenium Train...
Selenium Interview Questions and Answers | Selenium Tutorial | Selenium Train...Selenium Interview Questions and Answers | Selenium Tutorial | Selenium Train...
Selenium Interview Questions and Answers | Selenium Tutorial | Selenium Train...Edureka!
 
GL_Web application testing using selenium
GL_Web application testing using seleniumGL_Web application testing using selenium
GL_Web application testing using seleniumPragya Rastogi
 
Selenium course training institute ameerpet hyderabad
Selenium course training institute ameerpet hyderabadSelenium course training institute ameerpet hyderabad
Selenium course training institute ameerpet hyderabadSathya Technologies
 
Selenium course training institute ameerpet hyderabad – Best software trainin...
Selenium course training institute ameerpet hyderabad – Best software trainin...Selenium course training institute ameerpet hyderabad – Best software trainin...
Selenium course training institute ameerpet hyderabad – Best software trainin...Sathya Technologies
 
Mastering Test Automation: How To Use Selenium Successfully
Mastering Test Automation: How To Use Selenium SuccessfullyMastering Test Automation: How To Use Selenium Successfully
Mastering Test Automation: How To Use Selenium SuccessfullySpringPeople
 
Selenium - Introduction
Selenium - IntroductionSelenium - Introduction
Selenium - IntroductionAmr E. Mohamed
 
Automated Web Testing Using Selenium
Automated Web Testing Using SeleniumAutomated Web Testing Using Selenium
Automated Web Testing Using SeleniumWeifeng Zhang
 

Similaire à DevLabs Alliance Top 50 Selenium Interview Questions for SDET (20)

Selenium Automation Testing Interview Questions And Answers
Selenium Automation Testing Interview Questions And AnswersSelenium Automation Testing Interview Questions And Answers
Selenium Automation Testing Interview Questions And Answers
 
Selenium interview-questions-freshers
Selenium interview-questions-freshersSelenium interview-questions-freshers
Selenium interview-questions-freshers
 
Top 30 Selenium Interview Questions.pptx
Top 30 Selenium Interview Questions.pptxTop 30 Selenium Interview Questions.pptx
Top 30 Selenium Interview Questions.pptx
 
Selenium Webdriver Interview Questions
Selenium Webdriver Interview QuestionsSelenium Webdriver Interview Questions
Selenium Webdriver Interview Questions
 
Selenium Interview Questions And Answers | Selenium Interview Questions | Sel...
Selenium Interview Questions And Answers | Selenium Interview Questions | Sel...Selenium Interview Questions And Answers | Selenium Interview Questions | Sel...
Selenium Interview Questions And Answers | Selenium Interview Questions | Sel...
 
Selenium interview questions
Selenium interview questionsSelenium interview questions
Selenium interview questions
 
Interview question & Answers for 3+ years experienced in Selenium | LearningSlot
Interview question & Answers for 3+ years experienced in Selenium | LearningSlotInterview question & Answers for 3+ years experienced in Selenium | LearningSlot
Interview question & Answers for 3+ years experienced in Selenium | LearningSlot
 
Selenium
SeleniumSelenium
Selenium
 
25 Top Selenium Interview Questions and Answers for 2023.pdf
25 Top Selenium Interview Questions and Answers for 2023.pdf25 Top Selenium Interview Questions and Answers for 2023.pdf
25 Top Selenium Interview Questions and Answers for 2023.pdf
 
Interview Question & Answers for Selenium Freshers | LearningSlot
Interview Question & Answers for Selenium Freshers | LearningSlotInterview Question & Answers for Selenium Freshers | LearningSlot
Interview Question & Answers for Selenium Freshers | LearningSlot
 
selenium-webdriver-interview-questions.pdf
selenium-webdriver-interview-questions.pdfselenium-webdriver-interview-questions.pdf
selenium-webdriver-interview-questions.pdf
 
Seleniuminterviewquestions
Seleniuminterviewquestions Seleniuminterviewquestions
Seleniuminterviewquestions
 
Selenium Interview Questions and Answers | Selenium Tutorial | Selenium Train...
Selenium Interview Questions and Answers | Selenium Tutorial | Selenium Train...Selenium Interview Questions and Answers | Selenium Tutorial | Selenium Train...
Selenium Interview Questions and Answers | Selenium Tutorial | Selenium Train...
 
Selenium Primer
Selenium PrimerSelenium Primer
Selenium Primer
 
GL_Web application testing using selenium
GL_Web application testing using seleniumGL_Web application testing using selenium
GL_Web application testing using selenium
 
Selenium course training institute ameerpet hyderabad
Selenium course training institute ameerpet hyderabadSelenium course training institute ameerpet hyderabad
Selenium course training institute ameerpet hyderabad
 
Selenium course training institute ameerpet hyderabad – Best software trainin...
Selenium course training institute ameerpet hyderabad – Best software trainin...Selenium course training institute ameerpet hyderabad – Best software trainin...
Selenium course training institute ameerpet hyderabad – Best software trainin...
 
Mastering Test Automation: How To Use Selenium Successfully
Mastering Test Automation: How To Use Selenium SuccessfullyMastering Test Automation: How To Use Selenium Successfully
Mastering Test Automation: How To Use Selenium Successfully
 
Selenium - Introduction
Selenium - IntroductionSelenium - Introduction
Selenium - Introduction
 
Automated Web Testing Using Selenium
Automated Web Testing Using SeleniumAutomated Web Testing Using Selenium
Automated Web Testing Using Selenium
 

Dernier

2k Shots ≽ 9205541914 ≼ Call Girls In Tagore Garden (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Tagore Garden (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Tagore Garden (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Tagore Garden (Delhi)Delhi Call girls
 
sample sample sample sample sample sample
sample sample sample sample sample samplesample sample sample sample sample sample
sample sample sample sample sample sampleCasey Keith
 
Kanpur Call Girls Service ☎ ️82500–77686 ☎️ Enjoy 24/7 Escort Service
Kanpur Call Girls Service ☎ ️82500–77686 ☎️ Enjoy 24/7 Escort ServiceKanpur Call Girls Service ☎ ️82500–77686 ☎️ Enjoy 24/7 Escort Service
Kanpur Call Girls Service ☎ ️82500–77686 ☎️ Enjoy 24/7 Escort ServiceDamini Dixit
 
Darjeeling Call Girls 8250077686 Service Offer VIP Hot Model
Darjeeling Call Girls 8250077686 Service Offer VIP Hot ModelDarjeeling Call Girls 8250077686 Service Offer VIP Hot Model
Darjeeling Call Girls 8250077686 Service Offer VIP Hot ModelDeiva Sain Call Girl
 
Ahmedabad Escort Service Ahmedabad Call Girl 0000000000
Ahmedabad Escort Service Ahmedabad Call Girl 0000000000Ahmedabad Escort Service Ahmedabad Call Girl 0000000000
Ahmedabad Escort Service Ahmedabad Call Girl 0000000000mountabuangels4u
 
Genuine 8250077686 Hot and Beautiful 💕 Diu Escorts call Girls
Genuine 8250077686 Hot and Beautiful 💕 Diu Escorts call GirlsGenuine 8250077686 Hot and Beautiful 💕 Diu Escorts call Girls
Genuine 8250077686 Hot and Beautiful 💕 Diu Escorts call GirlsDeiva Sain Call Girl
 
💕📲09602870969💓Girl Escort Services Udaipur Call Girls in Chittorgarh Haldighati
💕📲09602870969💓Girl Escort Services Udaipur Call Girls in Chittorgarh Haldighati💕📲09602870969💓Girl Escort Services Udaipur Call Girls in Chittorgarh Haldighati
💕📲09602870969💓Girl Escort Services Udaipur Call Girls in Chittorgarh HaldighatiApsara Of India
 
WhatsApp Chat: 📞 8617697112 Suri Call Girls available for hotel room package
WhatsApp Chat: 📞 8617697112 Suri Call Girls available for hotel room packageWhatsApp Chat: 📞 8617697112 Suri Call Girls available for hotel room package
WhatsApp Chat: 📞 8617697112 Suri Call Girls available for hotel room packageNitya salvi
 
Alipore Call Girls - 📞 8617697112 🔝 Top Class Call Girls Service Available
Alipore Call Girls - 📞 8617697112 🔝 Top Class Call Girls Service AvailableAlipore Call Girls - 📞 8617697112 🔝 Top Class Call Girls Service Available
Alipore Call Girls - 📞 8617697112 🔝 Top Class Call Girls Service AvailableNitya salvi
 
sample sample sample sample sample sample
sample sample sample sample sample samplesample sample sample sample sample sample
sample sample sample sample sample sampleCasey Keith
 
Tamluk ❤CALL GIRL 8617697112 ❤CALL GIRLS IN Tamluk ESCORT SERVICE❤CALL GIRL
Tamluk ❤CALL GIRL 8617697112 ❤CALL GIRLS IN Tamluk ESCORT SERVICE❤CALL GIRLTamluk ❤CALL GIRL 8617697112 ❤CALL GIRLS IN Tamluk ESCORT SERVICE❤CALL GIRL
Tamluk ❤CALL GIRL 8617697112 ❤CALL GIRLS IN Tamluk ESCORT SERVICE❤CALL GIRLNitya salvi
 
Andheri Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Andheri Call Girls 🥰 8617370543 Service Offer VIP Hot ModelAndheri Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Andheri Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
WhatsApp Chat: 📞 8617697112 Independent Call Girls in Darjeeling
WhatsApp Chat: 📞 8617697112 Independent Call Girls in DarjeelingWhatsApp Chat: 📞 8617697112 Independent Call Girls in Darjeeling
WhatsApp Chat: 📞 8617697112 Independent Call Girls in DarjeelingNitya salvi
 
Genuine 8250077686 Hot and Beautiful 💕 Chennai Escorts call Girls
Genuine 8250077686 Hot and Beautiful 💕 Chennai Escorts call GirlsGenuine 8250077686 Hot and Beautiful 💕 Chennai Escorts call Girls
Genuine 8250077686 Hot and Beautiful 💕 Chennai Escorts call GirlsDeiva Sain Call Girl
 
Vadodara Escort💋 Call Girl (Bindu) Service #Vadodara Call Girl @Independent G...
Vadodara Escort💋 Call Girl (Bindu) Service #Vadodara Call Girl @Independent G...Vadodara Escort💋 Call Girl (Bindu) Service #Vadodara Call Girl @Independent G...
Vadodara Escort💋 Call Girl (Bindu) Service #Vadodara Call Girl @Independent G...mountabuangels4u
 
WhatsApp Chat: 📞 8617697112 Hire Call Girls Cooch Behar For a Sensual Sex Exp...
WhatsApp Chat: 📞 8617697112 Hire Call Girls Cooch Behar For a Sensual Sex Exp...WhatsApp Chat: 📞 8617697112 Hire Call Girls Cooch Behar For a Sensual Sex Exp...
WhatsApp Chat: 📞 8617697112 Hire Call Girls Cooch Behar For a Sensual Sex Exp...Nitya salvi
 
Jhargram call girls 📞 8617697112 At Low Cost Cash Payment Booking
Jhargram call girls 📞 8617697112 At Low Cost Cash Payment BookingJhargram call girls 📞 8617697112 At Low Cost Cash Payment Booking
Jhargram call girls 📞 8617697112 At Low Cost Cash Payment BookingNitya salvi
 
Ooty call girls 📞 8617697112 At Low Cost Cash Payment Booking
Ooty call girls 📞 8617697112 At Low Cost Cash Payment BookingOoty call girls 📞 8617697112 At Low Cost Cash Payment Booking
Ooty call girls 📞 8617697112 At Low Cost Cash Payment BookingNitya salvi
 
Papi kondalu Call Girls 8250077686 Service Offer VIP Hot Model
Papi kondalu Call Girls 8250077686 Service Offer VIP Hot ModelPapi kondalu Call Girls 8250077686 Service Offer VIP Hot Model
Papi kondalu Call Girls 8250077686 Service Offer VIP Hot ModelDeiva Sain Call Girl
 

Dernier (20)

2k Shots ≽ 9205541914 ≼ Call Girls In Tagore Garden (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Tagore Garden (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Tagore Garden (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Tagore Garden (Delhi)
 
sample sample sample sample sample sample
sample sample sample sample sample samplesample sample sample sample sample sample
sample sample sample sample sample sample
 
Kanpur Call Girls Service ☎ ️82500–77686 ☎️ Enjoy 24/7 Escort Service
Kanpur Call Girls Service ☎ ️82500–77686 ☎️ Enjoy 24/7 Escort ServiceKanpur Call Girls Service ☎ ️82500–77686 ☎️ Enjoy 24/7 Escort Service
Kanpur Call Girls Service ☎ ️82500–77686 ☎️ Enjoy 24/7 Escort Service
 
Discover Mathura And Vrindavan A Spritual Journey.pdf
Discover Mathura And Vrindavan A Spritual Journey.pdfDiscover Mathura And Vrindavan A Spritual Journey.pdf
Discover Mathura And Vrindavan A Spritual Journey.pdf
 
Darjeeling Call Girls 8250077686 Service Offer VIP Hot Model
Darjeeling Call Girls 8250077686 Service Offer VIP Hot ModelDarjeeling Call Girls 8250077686 Service Offer VIP Hot Model
Darjeeling Call Girls 8250077686 Service Offer VIP Hot Model
 
Ahmedabad Escort Service Ahmedabad Call Girl 0000000000
Ahmedabad Escort Service Ahmedabad Call Girl 0000000000Ahmedabad Escort Service Ahmedabad Call Girl 0000000000
Ahmedabad Escort Service Ahmedabad Call Girl 0000000000
 
Genuine 8250077686 Hot and Beautiful 💕 Diu Escorts call Girls
Genuine 8250077686 Hot and Beautiful 💕 Diu Escorts call GirlsGenuine 8250077686 Hot and Beautiful 💕 Diu Escorts call Girls
Genuine 8250077686 Hot and Beautiful 💕 Diu Escorts call Girls
 
💕📲09602870969💓Girl Escort Services Udaipur Call Girls in Chittorgarh Haldighati
💕📲09602870969💓Girl Escort Services Udaipur Call Girls in Chittorgarh Haldighati💕📲09602870969💓Girl Escort Services Udaipur Call Girls in Chittorgarh Haldighati
💕📲09602870969💓Girl Escort Services Udaipur Call Girls in Chittorgarh Haldighati
 
WhatsApp Chat: 📞 8617697112 Suri Call Girls available for hotel room package
WhatsApp Chat: 📞 8617697112 Suri Call Girls available for hotel room packageWhatsApp Chat: 📞 8617697112 Suri Call Girls available for hotel room package
WhatsApp Chat: 📞 8617697112 Suri Call Girls available for hotel room package
 
Alipore Call Girls - 📞 8617697112 🔝 Top Class Call Girls Service Available
Alipore Call Girls - 📞 8617697112 🔝 Top Class Call Girls Service AvailableAlipore Call Girls - 📞 8617697112 🔝 Top Class Call Girls Service Available
Alipore Call Girls - 📞 8617697112 🔝 Top Class Call Girls Service Available
 
sample sample sample sample sample sample
sample sample sample sample sample samplesample sample sample sample sample sample
sample sample sample sample sample sample
 
Tamluk ❤CALL GIRL 8617697112 ❤CALL GIRLS IN Tamluk ESCORT SERVICE❤CALL GIRL
Tamluk ❤CALL GIRL 8617697112 ❤CALL GIRLS IN Tamluk ESCORT SERVICE❤CALL GIRLTamluk ❤CALL GIRL 8617697112 ❤CALL GIRLS IN Tamluk ESCORT SERVICE❤CALL GIRL
Tamluk ❤CALL GIRL 8617697112 ❤CALL GIRLS IN Tamluk ESCORT SERVICE❤CALL GIRL
 
Andheri Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Andheri Call Girls 🥰 8617370543 Service Offer VIP Hot ModelAndheri Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Andheri Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
WhatsApp Chat: 📞 8617697112 Independent Call Girls in Darjeeling
WhatsApp Chat: 📞 8617697112 Independent Call Girls in DarjeelingWhatsApp Chat: 📞 8617697112 Independent Call Girls in Darjeeling
WhatsApp Chat: 📞 8617697112 Independent Call Girls in Darjeeling
 
Genuine 8250077686 Hot and Beautiful 💕 Chennai Escorts call Girls
Genuine 8250077686 Hot and Beautiful 💕 Chennai Escorts call GirlsGenuine 8250077686 Hot and Beautiful 💕 Chennai Escorts call Girls
Genuine 8250077686 Hot and Beautiful 💕 Chennai Escorts call Girls
 
Vadodara Escort💋 Call Girl (Bindu) Service #Vadodara Call Girl @Independent G...
Vadodara Escort💋 Call Girl (Bindu) Service #Vadodara Call Girl @Independent G...Vadodara Escort💋 Call Girl (Bindu) Service #Vadodara Call Girl @Independent G...
Vadodara Escort💋 Call Girl (Bindu) Service #Vadodara Call Girl @Independent G...
 
WhatsApp Chat: 📞 8617697112 Hire Call Girls Cooch Behar For a Sensual Sex Exp...
WhatsApp Chat: 📞 8617697112 Hire Call Girls Cooch Behar For a Sensual Sex Exp...WhatsApp Chat: 📞 8617697112 Hire Call Girls Cooch Behar For a Sensual Sex Exp...
WhatsApp Chat: 📞 8617697112 Hire Call Girls Cooch Behar For a Sensual Sex Exp...
 
Jhargram call girls 📞 8617697112 At Low Cost Cash Payment Booking
Jhargram call girls 📞 8617697112 At Low Cost Cash Payment BookingJhargram call girls 📞 8617697112 At Low Cost Cash Payment Booking
Jhargram call girls 📞 8617697112 At Low Cost Cash Payment Booking
 
Ooty call girls 📞 8617697112 At Low Cost Cash Payment Booking
Ooty call girls 📞 8617697112 At Low Cost Cash Payment BookingOoty call girls 📞 8617697112 At Low Cost Cash Payment Booking
Ooty call girls 📞 8617697112 At Low Cost Cash Payment Booking
 
Papi kondalu Call Girls 8250077686 Service Offer VIP Hot Model
Papi kondalu Call Girls 8250077686 Service Offer VIP Hot ModelPapi kondalu Call Girls 8250077686 Service Offer VIP Hot Model
Papi kondalu Call Girls 8250077686 Service Offer VIP Hot Model
 

DevLabs Alliance Top 50 Selenium Interview Questions for SDET

  • 1. Top 50 Selenium Interview Questions for SDET By DevLabs Alliance Visit us at: www.devlabsalliance.com Email: training@devlabsalliance.com Contact: +91 9717514555
  • 2. Selenium Interview Questions for SDET 1. What is Selenium? Selenium is an open-source automation testing tool used for testing the web applications. It is an open-source tool means it does not require any licensing cost and can be used with various browsers like Mozilla Firefox, internet Explorer, Google Chrome, Safari or Opera. The test scripts for Selenium can be written in various programming languages like Java, Python, C#, PHP, Ruby, Perl and .Net.
  • 3. Selenium Interview Questions for SDET 2. What are the advantages of Selenium? The advantages of Selenium are as follows: • It is an open source tool. • It supports multiple languages like Java, Python, Perl, C#, PHP, Ruby. • It can operate and support across multiple Operating Systems like Windows, Mac, Linux, Unix, etc. • It provides support across multiple browsers like Internet Explorer, Google Chrome, Mozilla Firefox, Opera, Safari,etc.
  • 4. Selenium Interview Questions for SDET 3. What are the limitations of Selenium? The limitations of Selenium are as follows: • It does not support testing of mobile applications. • It is used for testing only web applications. • It cannot test Captcha and Barcode readers. • Reports can’t be generated directly through it. For generating reports, additional tools like TestNG or JUnit are used.
  • 5. Selenium Interview Questions for SDET 4. What is Selenese? Selenese is the language that is used to write test scripts in Selenium IDE.
  • 6. Selenium Interview Questions for SDET 5. What are the different types of locators in Selenium? The various locators in Selenium are as follows: • Link text • Partial Link Text • Id • Name • Tag Name • Class Name • Xpath • CSS Selector
  • 7. Selenium Interview Questions for SDET 6. What is the difference between Assert and verify commands? Assert and Verify both are used to check whether the given condition is true or false. In Assert command, if any condition fails then the execution will stop, and no further test steps will be executed. But in Verify command, if any condition fails then the execution will not stop and all further test steps will be executed.
  • 8. Selenium Interview Questions for SDET 7. What is the difference between setSpeed() and sleep() method in Selenium? setSpeed() method is used to delay every Selenium operation. eg. setSpeed(“5000”): It will stop the execution for 5 seconds. sleep() method is used to delay only a single operation where it is written. eg. sleep(5000): It will wait for 5 seconds.
  • 9. Selenium Interview Questions for SDET 8. What is the use of Selenium Grid and how it works? Selenium Grid is used to execute the same or different test scripts on various platforms and browsers parallelly. This helps in testing the application in different environments concurrently and hence saving the execution time. Working of Selenium Grid: Selenium Grid sent the tests to the hub(central server that controls the execution on different machines). These tests are then redirected to Selenium Web driver, which launch the browser and run the test.
  • 10. Selenium Interview Questions for SDET 9. What is XPath? XPath is called as XML Path. It is a syntax or language that provides a way to locate and process the elements in XML documents. It is used in Selenium to uniquely identify any element on a webpage using HTML DOM structure.
  • 11. Selenium Interview Questions for SDET 10. Explain Absolute and Relative XPath. Absolute XPath: It is used to find the XPath directly by giving the exact path of the element as described in HTML DOM structure. If any change is done in the path of the element, then XPath will get fail. It begins with single forward slash(/), means that you can select the element starting from the root node. Relative XPath: Relative XPath starts searching the matching element from anywhere in the HTML DOM structure. It begins with double forward slash(//), which means it can search the element anywhere in the page.
  • 12. Selenium Interview Questions for SDET 11. What is the syntax of XPath? //tagName[@attributeName = ‘attributeValue’] for eg.: //input[@id = ‘txtUserName’]
  • 13. Selenium Interview Questions for SDET 12. What is the difference between findElement() and findElements()? FindElement() returns only one Web Element.If there are more than 1 matches, then it will return first appearance in DOM. If there is no such element present in the DOM, then it will throw ElementNotFound exception. FindElements() returns the list of Web elements present in the webpage. If there is no such element present, then it will return the empty list and will not throw any exception.
  • 14. Selenium Interview Questions for SDET 13. What is the difference between Implicit Wait and Explicit Wait? Implicit Wait: It is used to tell Web driver to wait for some certain amount of time while trying to find an element in DOM before throwing an exception. It is applied on all Selenium commands. Explicit Wait: It is used to tell the Web driver to wait for some extended amount of time for some specific search or till the time some specific condition is met. It is one-timer and is used for a particular search.
  • 15. Selenium Interview Questions for SDET 14. What are the different Exceptions present in Selenium Web driver? The various exceptions in Selenium Webdriver are as follows: • NoSuchElementException • ElementNotVisibleException • TimeOutException • NotFoundException • SessionNotFoundException
  • 16. Selenium Interview Questions for SDET 15. What are the different ways to refresh browser using Selenium? The different ways to refresh the browser are: • navigate.refresh() • getCurrentURL() • navigate.to(driver.getCurrentURL()) • sendKeys(Keys.F5)
  • 17. Selenium Interview Questions for SDET 16. What are the different types of navigation commands? The different types of navigation commands are: • driver.navigate().to(Url) • driver.navigate().forward() • driver.navigate().refresh() • driver.navigate().back()
  • 18. Selenium Interview Questions for SDET 17. What are the different ways to select a value in a dropdown? The different ways to select a value in a dropdown are: • selectByVisibleText() • selectByValue() • selectByIndex()
  • 19. Selenium Interview Questions for SDET 18. What is the difference between driver.close() and driver.quit() commands? driver.close() is used to close only the current window that IWebDriver is controlling driver.quit() is used to close all the Windows opened by IWebDriver.
  • 20. Selenium Interview Questions for SDET 19. What is Single Slash(/) and Double Slash(//) in XPath? Single Slash is used in Absolute XPath and it instructs the XPath Search Engine to start searching for element starting from the root node. Double Slash is used in Relative XPath and it instructs the XPath Search Engine to search for matching element anywhere in the XML document.
  • 21. Selenium Interview Questions for SDET 20. How to use screen coordinates while using click command? To click on any specific part of an element, clickAt command is used. ClickAt command uses element locator and x,y co-ordinates as arguments- clickAt(locator, coordString)
  • 22. Selenium Interview Questions for SDET 21. How can you submit a form using Selenium? submit() method on element is used to submit a form. element.submit();
  • 23. Selenium Interview Questions for SDET 22. How can you login in the site if it is showing any authentication pop- up for username and password? We can login by passing the username and password with URL: http://username:password@url
  • 24. Selenium Interview Questions for SDET 23. What is Object Repository? Object Repository is used to store all the objects that are used in the scripts in one or more centralized location rather than scattered all over the test script. The main advantage of using Object repository is to segregate all objects in one place. If any locator value of any web element changes, then change need to be done at only one place i.e. object repository rather than making changes in all test cases where that particular locator is used.
  • 25. Selenium Interview Questions for SDET 24. How double click can be performed using Selenium Webdriver? We can performed double click by using Actions class. Actions act= new Actions(driver); act.doubleClick(webElement);
  • 26. Selenium Interview Questions for SDET 25. How to get a text of a web element? getText() method is used to get the text of a web element. string text= driver.findElement(by.id(“Text”)).getText();
  • 27. Selenium Interview Questions for SDET 26. What are Soft Assert and Hard Assert in Selenium? Soft Assert does not throw any exception if an assert statement fails and will continue to next step in the test after the assert statement. Hard Assert throws an AssertException if any assert statement fails and will not continue with the further steps in the test.
  • 28. Selenium Interview Questions for SDET 27. What is Selenium Webdriver? Webdriver is an API that is easy to explore and understand and helps us to make tests easier to read and maintain. It is an interface that comes under org.openqa.selenium package of Selenium.
  • 29. Selenium Interview Questions for SDET 28. Is Webdriver class or an Interface? Webdriver is an interface and comes under the org.openqa.selenium package of Selenium and a sub-interface of “SearchContext”.
  • 30. Selenium Interview Questions for SDET 29. Name some interfaces in Webdriver Interface. Some of the interfaces in Webdriver Interface are as follows: • WebDriver.ImeHandler: An interface used for managing inputs. • WebDriver.Navigation: An interface used for managing Page navigation. • WebDriver.Options: An interface used for managing browser menu operations. • WebDriver.TargetLocator: An interface used for locating frames and windows. • WebDriver.Timeouts: An interface used for managing timeouts. • WebDriver.Window: An interface used for managing window visualization.
  • 31. Selenium Interview Questions for SDET 30. How to launch a browser using Selenium WebDriver? Browser is launched by creating an object of a required driver class such as FirefoxDriver, ChromeDriver, InternetExplorerDriver, etc. Launching Chrome Driver: WebDriver driver = new ChromeDriver(); Launching FireFox Driver: WebDriver driver = new GeckoDriver(); Launching Internet Explorer Driver: WebDriver driver = new InternetExplorerDriver();
  • 32. Selenium Interview Questions for SDET 31. What is the super interface of WebDriver? “SearchContext” is the super interface of WebDriver.
  • 33. Selenium Interview Questions for SDET 32. What is frame and how can you switch between frames in Selenium? Frame is a HTML document which is embedded inside HTML document. To switch between frame, following Selenium command is used: driver.switchTo().frame(By.tagName(“iFrame”));
  • 34. Selenium Interview Questions for SDET 33. How can you switch back to main page from a frame? defaultContent() method is used to switch back from a frame. eg.: driver.switchTo().defaultContent();
  • 35. Selenium Interview Questions for SDET 34. What are the various ways to switch between the frames? The various ways to switch between frames are as follows: • Switch to frame by Index: driver.switchTo().frame(0); • Switch to Frame by Name: driver.switchTo().frame(“iframe”); • Switch to Frame by Id: driver.switchTo().frame(“IF1”);
  • 36. Selenium Interview Questions for SDET 35. How can you find total number of frames in a web-page? size() method is used to find the total number of frames in a web-page. Syntax: List<WebElements> ListItems = driver.findElements(By.tagName(“iFrame”)); No. of Frames = ListItems.size();
  • 37. Selenium Interview Questions for SDET 36. What is Select class in Selenium? Select class is used to select the values in dropdown or multiselect. Syntax: Select abc = new Select(driver.FindElement(By.Id(“ ”))); abc.SelectByVisibleText(“ “);
  • 38. Selenium Interview Questions for SDET 37. How can you deselect any option from Multiselect? To deselect any text from multiselect, deSelectByVisibleText() method is used. Syntax: abc.deSelectByVisibleText(“ “);
  • 39. Selenium Interview Questions for SDET 38. How can you move to some element using Actions class? To move any element, below Actions method is used: WebElement abc = driver.FindElement(By.Id(“ “)); new Actions(driver).moveToElement(abc).perform;
  • 40. Selenium Interview Questions for SDET 39. How to capture screenshots in Selenium? To capture the screenshot, below code can be written: File srcFile = ((RemoteWebDriver) driver).getScreenShotAs(OutputType.FILE); File destFile = new file(“E:/screenshot.png”); FileUtils.copyFile(srcFile, destFile);
  • 41. Selenium Interview Questions for SDET 40. Can captcha and Barcode reader be automated using Selenium? No, captcha and barcode reader can’t be automated using Selenium.
  • 42. Selenium Interview Questions for SDET 41. Can Selenium Webdriver test Mobile applications? No, Selenium Webdriver can’t test mobile applications.
  • 43. Selenium Interview Questions for SDET 42. How to click on a hyperlink using linkText? driver.findElement(By.linkText(“devLabsAlliance”)).click();
  • 44. Selenium Interview Questions for SDET 43. How can you type in a textbox using Selenium? sendKeys() method is used to type a string in a textbox. Syntax: WebElement user = driver.FindElement(By.Id(“usrName”)); user.sendKeys(“devLabs”);
  • 45. Selenium Interview Questions for SDET 44. What are BreakPoints and StartPoints in Selenium? BreakPoints: BreakPoint will stop the execution of code there only where it is inserted. StartPoints: StartPoint is used to specify the point from where the execution should begin.
  • 46. Selenium Interview Questions for SDET 45. What is the difference between getWindowHandles() and getWindowHandle()? getWindowHandles(): It returns the address of all the open windows initiated by driver. Its return type is Set<String>. getWindowHandle(): It returns the address of the current browser where the control is. Its return type is string.
  • 47. Selenium Interview Questions for SDET 46. What is Selenium framework? A framework is a code structure which helps to make code understanding and maintenance easy. With framework, we can place the code and data separately which makes it easy to read and can be re-used as well.
  • 48. Selenium Interview Questions for SDET 47. What are the different types of Selenium framework? There are 3 types of Selenium framework: • Data-driven Framework: In Data-driven framework, test- data is written in some external files like Excel, csv or XML and that file is used for getting the test data. • Keyword-driven Framework: In keyword-driven framework, all the operations and instructions are written in some external file like Excel worksheet. • Hybrid Framework: It takes the advantage of both Keyword driven and Data driven framework.
  • 49. Selenium Interview Questions for SDET 48. What is FluentWait in Selenium? It defines the maximum amount of time to wait for a specific condition and frequency before throwing an ElementNotVisibleException exception. Fluent Wait have pooling capacity. It means that after this particular time, it can check if application is loaded and then it can move further without waiting for max time.
  • 50. Selenium Interview Questions for SDET 49. How can you get the text of alert pop-up in Selenium? To get the text of alert pop-up, below statement is used: driver.switchTo().alert().getText();
  • 51. Selenium Interview Questions for SDET 50. How can you dismiss the alert pop-up in Selenium? To dismiss the alert pop-up, below statement is used: driver.switchTo().alert().dismiss();
  • 52. Visit us at: www.devlabsalliance.com Email: training@devlabsalliance.com Contact: +91 9717514555