SlideShare a Scribd company logo
1 of 16
Selenium Interview Questions with
Answers (Coding based)
Question
Question
How do you take a screenshot in Selenium?
Answer
File src = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);
FileUtils.copyFile(src, new File("screenshots/error.png"));
Use TakeScreenshot Interface, typecasted to driver instance.
1. Copy Taken screen shot to any file on hard drive.
Question
How do you simulate mouse operations in Selenium?
Answer
To simulate mouse operations in Selenium,
• Choose Actions class under selenium > operations package. Ii is used for
mouse operations. It is a a user-facing API for emulating complex user
gestures.
• Selenium recommends use of this class for Mouse operations.
• It implements the builder pattern: Builds a Composite Action containing all
actions specified by the method calls.
Question
How to select drop down values in Selenium?
Approaches to select drop down?
Answer
We use Select class under selenium > support > ui package to select
and deselect in a dropdown list box. There are multiple approaches to do
so as mentioned:
Approaches
1. selectByIndex(int index) Select the option at the given index.
2. selectByValue(java.lang.String value) Select all options that have a value matching the argument.
3. selectByVisibleText(java.lang.String text) Select all options that display text matching the argument.
Question
How do you simulate Special Keys in Selenium like
Ctrl , Alt etc.
Answer
Enum Keys is used for this purpose.
This is part of selenium package.
Keys.chord(Keys.CONTROL,"c")).perform()
The above code will simulate the behavior of CTRL + C
Question
Tell me how do you work with multiple windows in
Selenium?
Answer
Some web applications have many frames or multiple windows. WebDriver
supports moving between named windows using the “switchTo” method:
driver.switchTo().window("windowName");
You can pass a “window handle” to the “switchTo().window()” method. Knowing
this, it’s possible to iterate over every open window like so:
for (String handle : driver.getWindowHandles())
{
driver.switchTo().window(handle);
}
Question
How do you handle HTML Tables in Selenium?
Answer
1.’table’ tag defines html table.
2.’tbody’ tag defines container for rows and columns.
3.’tr’ defines rows in an html table.
4.’td’/’th’ define column of an html table.
Use tagname locator strategy to identify and extract data
Question
Which is the most effective locator strategy in Selenium?
Answer
CSS works with simple attributes like ID and Class, XPATH will traverse the DOM
top down to work with nested elements, so CSS is faster
CSS are clear and concise. Also Selectors are more readable.
16
THANKS!
Any questions?
You can contact us at
▪ info@techcanvass.com
▪ 022-40155 175
▪ 7738 7731 08
www.techcanvass.com

More Related Content

What's hot

Selenium webdriver interview questions and answers
Selenium webdriver interview questions and answersSelenium webdriver interview questions and answers
Selenium webdriver interview questions and answersITeLearn
 
Selenium interview-questions-freshers
Selenium interview-questions-freshersSelenium interview-questions-freshers
Selenium interview-questions-freshersNaga Mani
 
Selenium - Introduction
Selenium - IntroductionSelenium - Introduction
Selenium - IntroductionAmr E. Mohamed
 
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!
 
Selenium Basics Tutorial
Selenium Basics TutorialSelenium Basics Tutorial
Selenium Basics TutorialClever Moe
 
Ajit jadhav automation_qa_4_ yrs
Ajit jadhav automation_qa_4_ yrsAjit jadhav automation_qa_4_ yrs
Ajit jadhav automation_qa_4_ yrsAjit Jadhav
 
Test Automation and Selenium
Test Automation and SeleniumTest Automation and Selenium
Test Automation and SeleniumKarapet Sarkisyan
 
An overview of selenium webdriver
An overview of selenium webdriverAn overview of selenium webdriver
An overview of selenium webdriverAnuraj S.L
 
Selenium IDE Tutorial For Beginners | What Is Selenium IDE? | Selenium Tutori...
Selenium IDE Tutorial For Beginners | What Is Selenium IDE? | Selenium Tutori...Selenium IDE Tutorial For Beginners | What Is Selenium IDE? | Selenium Tutori...
Selenium IDE Tutorial For Beginners | What Is Selenium IDE? | Selenium Tutori...Edureka!
 
Selenium test automation
Selenium test automationSelenium test automation
Selenium test automationSrikanth Vuriti
 

What's hot (20)

Selenium webdriver interview questions and answers
Selenium webdriver interview questions and answersSelenium webdriver interview questions and answers
Selenium webdriver interview questions and answers
 
Selenium interview-questions-freshers
Selenium interview-questions-freshersSelenium interview-questions-freshers
Selenium interview-questions-freshers
 
Selenium - Introduction
Selenium - IntroductionSelenium - Introduction
Selenium - Introduction
 
Automation Testing by Selenium Web Driver
Automation Testing by Selenium Web DriverAutomation Testing by Selenium Web Driver
Automation Testing by Selenium Web Driver
 
Selenium Concepts
Selenium ConceptsSelenium Concepts
Selenium Concepts
 
Selenium
SeleniumSelenium
Selenium
 
Introduction to Selenium Web Driver
Introduction to Selenium Web DriverIntroduction to Selenium Web Driver
Introduction to Selenium Web Driver
 
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 Basics Tutorial
Selenium Basics TutorialSelenium Basics Tutorial
Selenium Basics Tutorial
 
Selenium WebDriver FAQ's
Selenium WebDriver FAQ'sSelenium WebDriver FAQ's
Selenium WebDriver FAQ's
 
Ajit jadhav automation_qa_4_ yrs
Ajit jadhav automation_qa_4_ yrsAjit jadhav automation_qa_4_ yrs
Ajit jadhav automation_qa_4_ yrs
 
Selenium IDE
Selenium IDESelenium IDE
Selenium IDE
 
Selenium ppt
Selenium pptSelenium ppt
Selenium ppt
 
Test Automation and Selenium
Test Automation and SeleniumTest Automation and Selenium
Test Automation and Selenium
 
An overview of selenium webdriver
An overview of selenium webdriverAn overview of selenium webdriver
An overview of selenium webdriver
 
Selenium IDE Tutorial For Beginners | What Is Selenium IDE? | Selenium Tutori...
Selenium IDE Tutorial For Beginners | What Is Selenium IDE? | Selenium Tutori...Selenium IDE Tutorial For Beginners | What Is Selenium IDE? | Selenium Tutori...
Selenium IDE Tutorial For Beginners | What Is Selenium IDE? | Selenium Tutori...
 
Selenium test automation
Selenium test automationSelenium test automation
Selenium test automation
 
Selenium WebDriver training
Selenium WebDriver trainingSelenium WebDriver training
Selenium WebDriver training
 
Selenium web driver
Selenium web driverSelenium web driver
Selenium web driver
 
Introduction to selenium
Introduction to seleniumIntroduction to selenium
Introduction to selenium
 

Similar to Selenium Interview Questions & Answers

Testing And Drupal
Testing And DrupalTesting And Drupal
Testing And DrupalPeter Arato
 
Tellurium At Rich Web Experience2009
Tellurium At Rich Web Experience2009Tellurium At Rich Web Experience2009
Tellurium At Rich Web Experience2009John.Jian.Fang
 
Eclipse Summit Europe '10 - Test UI Aspects of Plug-ins
Eclipse Summit Europe '10 - Test UI Aspects of Plug-insEclipse Summit Europe '10 - Test UI Aspects of Plug-ins
Eclipse Summit Europe '10 - Test UI Aspects of Plug-insTonny Madsen
 
Introduction to Selenium and Test Automation
Introduction to Selenium and Test AutomationIntroduction to Selenium and Test Automation
Introduction to Selenium and Test AutomationAhmed Mubbashir Khan
 
How to develop a Graphical User Interface (GUI) in Scilab
How to develop a Graphical User Interface (GUI) in ScilabHow to develop a Graphical User Interface (GUI) in Scilab
How to develop a Graphical User Interface (GUI) in ScilabScilab
 
Lhy tutorial gui(1)
Lhy tutorial gui(1)Lhy tutorial gui(1)
Lhy tutorial gui(1)Brijesh Naik
 
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
 
Building a Driver: Lessons Learned From Developing the Internet Explorer Driver
Building a Driver: Lessons Learned From Developing the Internet Explorer DriverBuilding a Driver: Lessons Learned From Developing the Internet Explorer Driver
Building a Driver: Lessons Learned From Developing the Internet Explorer Driverseleniumconf
 
Working Effectively With Legacy Code
Working Effectively With Legacy CodeWorking Effectively With Legacy Code
Working Effectively With Legacy CodeNaresh Jain
 
Eclipse e4 on Java Forum Stuttgart 2010
Eclipse e4 on Java Forum Stuttgart 2010Eclipse e4 on Java Forum Stuttgart 2010
Eclipse e4 on Java Forum Stuttgart 2010Lars Vogel
 
Selenium with testng and eclipse ide
Selenium with testng and eclipse ideSelenium with testng and eclipse ide
Selenium with testng and eclipse ideTestertester Jaipur
 
Alexandre.iline rit 2010 java_fxui_extra
Alexandre.iline rit 2010 java_fxui_extraAlexandre.iline rit 2010 java_fxui_extra
Alexandre.iline rit 2010 java_fxui_extrarit2010
 
Re-Design with Elixir/OTP
Re-Design with Elixir/OTPRe-Design with Elixir/OTP
Re-Design with Elixir/OTPMustafa TURAN
 
Automated ui testing with selenium. drupal con london 2011
Automated ui testing with selenium. drupal con london 2011Automated ui testing with selenium. drupal con london 2011
Automated ui testing with selenium. drupal con london 2011Yuriy Gerasimov
 
The Ring programming language version 1.8 book - Part 95 of 202
The Ring programming language version 1.8 book - Part 95 of 202The Ring programming language version 1.8 book - Part 95 of 202
The Ring programming language version 1.8 book - Part 95 of 202Mahmoud Samir Fayed
 
UI Automation_White_CodedUI common problems and tricks
UI Automation_White_CodedUI common problems and tricksUI Automation_White_CodedUI common problems and tricks
UI Automation_White_CodedUI common problems and tricksTsimafei Avilin
 

Similar to Selenium Interview Questions & Answers (20)

Testing And Drupal
Testing And DrupalTesting And Drupal
Testing And Drupal
 
What is selenium
What is seleniumWhat is selenium
What is selenium
 
Tellurium At Rich Web Experience2009
Tellurium At Rich Web Experience2009Tellurium At Rich Web Experience2009
Tellurium At Rich Web Experience2009
 
Csharp
CsharpCsharp
Csharp
 
Eclipse Summit Europe '10 - Test UI Aspects of Plug-ins
Eclipse Summit Europe '10 - Test UI Aspects of Plug-insEclipse Summit Europe '10 - Test UI Aspects of Plug-ins
Eclipse Summit Europe '10 - Test UI Aspects of Plug-ins
 
Custom components
Custom componentsCustom components
Custom components
 
Introduction to Selenium and Test Automation
Introduction to Selenium and Test AutomationIntroduction to Selenium and Test Automation
Introduction to Selenium and Test Automation
 
How to develop a Graphical User Interface (GUI) in Scilab
How to develop a Graphical User Interface (GUI) in ScilabHow to develop a Graphical User Interface (GUI) in Scilab
How to develop a Graphical User Interface (GUI) in Scilab
 
Lhy tutorial gui(1)
Lhy tutorial gui(1)Lhy tutorial gui(1)
Lhy tutorial gui(1)
 
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
 
Building a Driver: Lessons Learned From Developing the Internet Explorer Driver
Building a Driver: Lessons Learned From Developing the Internet Explorer DriverBuilding a Driver: Lessons Learned From Developing the Internet Explorer Driver
Building a Driver: Lessons Learned From Developing the Internet Explorer Driver
 
Working Effectively With Legacy Code
Working Effectively With Legacy CodeWorking Effectively With Legacy Code
Working Effectively With Legacy Code
 
Eclipse Tricks
Eclipse TricksEclipse Tricks
Eclipse Tricks
 
Eclipse e4 on Java Forum Stuttgart 2010
Eclipse e4 on Java Forum Stuttgart 2010Eclipse e4 on Java Forum Stuttgart 2010
Eclipse e4 on Java Forum Stuttgart 2010
 
Selenium with testng and eclipse ide
Selenium with testng and eclipse ideSelenium with testng and eclipse ide
Selenium with testng and eclipse ide
 
Alexandre.iline rit 2010 java_fxui_extra
Alexandre.iline rit 2010 java_fxui_extraAlexandre.iline rit 2010 java_fxui_extra
Alexandre.iline rit 2010 java_fxui_extra
 
Re-Design with Elixir/OTP
Re-Design with Elixir/OTPRe-Design with Elixir/OTP
Re-Design with Elixir/OTP
 
Automated ui testing with selenium. drupal con london 2011
Automated ui testing with selenium. drupal con london 2011Automated ui testing with selenium. drupal con london 2011
Automated ui testing with selenium. drupal con london 2011
 
The Ring programming language version 1.8 book - Part 95 of 202
The Ring programming language version 1.8 book - Part 95 of 202The Ring programming language version 1.8 book - Part 95 of 202
The Ring programming language version 1.8 book - Part 95 of 202
 
UI Automation_White_CodedUI common problems and tricks
UI Automation_White_CodedUI common problems and tricksUI Automation_White_CodedUI common problems and tricks
UI Automation_White_CodedUI common problems and tricks
 

More from Techcanvass

ECBA Exam Questions PDF | ECBA Sample Questions PDF | Techcanvass
ECBA Exam Questions PDF | ECBA Sample Questions PDF | TechcanvassECBA Exam Questions PDF | ECBA Sample Questions PDF | Techcanvass
ECBA Exam Questions PDF | ECBA Sample Questions PDF | TechcanvassTechcanvass
 
Free CCBA exam questions PDF
Free CCBA exam questions PDFFree CCBA exam questions PDF
Free CCBA exam questions PDFTechcanvass
 
Selenium web element commands cheat sheet
Selenium web element commands   cheat sheetSelenium web element commands   cheat sheet
Selenium web element commands cheat sheetTechcanvass
 
CBAP Certification Overview
CBAP Certification OverviewCBAP Certification Overview
CBAP Certification OverviewTechcanvass
 
CCBA Certification Overview
CCBA Certification OverviewCCBA Certification Overview
CCBA Certification OverviewTechcanvass
 
5 things to do to become a Business Analyst
5 things to do to become a Business Analyst5 things to do to become a Business Analyst
5 things to do to become a Business AnalystTechcanvass
 
Business analysis Fundamentals | Fundamentals of business analysis
Business analysis Fundamentals | Fundamentals of business analysisBusiness analysis Fundamentals | Fundamentals of business analysis
Business analysis Fundamentals | Fundamentals of business analysisTechcanvass
 
What is Data Dictionary - BABOK technique
What is Data Dictionary - BABOK techniqueWhat is Data Dictionary - BABOK technique
What is Data Dictionary - BABOK techniqueTechcanvass
 
SQL Quick Reference Card
SQL Quick Reference CardSQL Quick Reference Card
SQL Quick Reference CardTechcanvass
 
IIBA ECBA Certification Exam preparation Strategy
IIBA ECBA Certification Exam preparation StrategyIIBA ECBA Certification Exam preparation Strategy
IIBA ECBA Certification Exam preparation StrategyTechcanvass
 
User stories basics
User stories basicsUser stories basics
User stories basicsTechcanvass
 
Business analyst certifications
Business analyst certificationsBusiness analyst certifications
Business analyst certificationsTechcanvass
 
CBAP sample questions
CBAP sample questionsCBAP sample questions
CBAP sample questionsTechcanvass
 
Selenium Tutorial for Beginners | Automation framework Basics
Selenium Tutorial for Beginners | Automation framework BasicsSelenium Tutorial for Beginners | Automation framework Basics
Selenium Tutorial for Beginners | Automation framework BasicsTechcanvass
 
Agile business analyst
Agile business analystAgile business analyst
Agile business analystTechcanvass
 
Agile Scrum Quick Reference Card
Agile Scrum Quick Reference CardAgile Scrum Quick Reference Card
Agile Scrum Quick Reference CardTechcanvass
 
CBAP Certification Basics
CBAP Certification BasicsCBAP Certification Basics
CBAP Certification BasicsTechcanvass
 
IIBA BABOK version 3 - What's inside
IIBA BABOK version 3 - What's insideIIBA BABOK version 3 - What's inside
IIBA BABOK version 3 - What's insideTechcanvass
 
Business Analysis Core Concepts Model (BACCM)
Business Analysis Core Concepts Model (BACCM)Business Analysis Core Concepts Model (BACCM)
Business Analysis Core Concepts Model (BACCM)Techcanvass
 
Function point analysis introduction
Function point analysis introductionFunction point analysis introduction
Function point analysis introductionTechcanvass
 

More from Techcanvass (20)

ECBA Exam Questions PDF | ECBA Sample Questions PDF | Techcanvass
ECBA Exam Questions PDF | ECBA Sample Questions PDF | TechcanvassECBA Exam Questions PDF | ECBA Sample Questions PDF | Techcanvass
ECBA Exam Questions PDF | ECBA Sample Questions PDF | Techcanvass
 
Free CCBA exam questions PDF
Free CCBA exam questions PDFFree CCBA exam questions PDF
Free CCBA exam questions PDF
 
Selenium web element commands cheat sheet
Selenium web element commands   cheat sheetSelenium web element commands   cheat sheet
Selenium web element commands cheat sheet
 
CBAP Certification Overview
CBAP Certification OverviewCBAP Certification Overview
CBAP Certification Overview
 
CCBA Certification Overview
CCBA Certification OverviewCCBA Certification Overview
CCBA Certification Overview
 
5 things to do to become a Business Analyst
5 things to do to become a Business Analyst5 things to do to become a Business Analyst
5 things to do to become a Business Analyst
 
Business analysis Fundamentals | Fundamentals of business analysis
Business analysis Fundamentals | Fundamentals of business analysisBusiness analysis Fundamentals | Fundamentals of business analysis
Business analysis Fundamentals | Fundamentals of business analysis
 
What is Data Dictionary - BABOK technique
What is Data Dictionary - BABOK techniqueWhat is Data Dictionary - BABOK technique
What is Data Dictionary - BABOK technique
 
SQL Quick Reference Card
SQL Quick Reference CardSQL Quick Reference Card
SQL Quick Reference Card
 
IIBA ECBA Certification Exam preparation Strategy
IIBA ECBA Certification Exam preparation StrategyIIBA ECBA Certification Exam preparation Strategy
IIBA ECBA Certification Exam preparation Strategy
 
User stories basics
User stories basicsUser stories basics
User stories basics
 
Business analyst certifications
Business analyst certificationsBusiness analyst certifications
Business analyst certifications
 
CBAP sample questions
CBAP sample questionsCBAP sample questions
CBAP sample questions
 
Selenium Tutorial for Beginners | Automation framework Basics
Selenium Tutorial for Beginners | Automation framework BasicsSelenium Tutorial for Beginners | Automation framework Basics
Selenium Tutorial for Beginners | Automation framework Basics
 
Agile business analyst
Agile business analystAgile business analyst
Agile business analyst
 
Agile Scrum Quick Reference Card
Agile Scrum Quick Reference CardAgile Scrum Quick Reference Card
Agile Scrum Quick Reference Card
 
CBAP Certification Basics
CBAP Certification BasicsCBAP Certification Basics
CBAP Certification Basics
 
IIBA BABOK version 3 - What's inside
IIBA BABOK version 3 - What's insideIIBA BABOK version 3 - What's inside
IIBA BABOK version 3 - What's inside
 
Business Analysis Core Concepts Model (BACCM)
Business Analysis Core Concepts Model (BACCM)Business Analysis Core Concepts Model (BACCM)
Business Analysis Core Concepts Model (BACCM)
 
Function point analysis introduction
Function point analysis introductionFunction point analysis introduction
Function point analysis introduction
 

Recently uploaded

LESSON O1_The Meaning and Importance of MICE.pdf
LESSON O1_The Meaning and Importance of MICE.pdfLESSON O1_The Meaning and Importance of MICE.pdf
LESSON O1_The Meaning and Importance of MICE.pdf0471992maroyal
 
定制(Waikato毕业证书)新西兰怀卡托大学毕业证成绩单原版一比一
定制(Waikato毕业证书)新西兰怀卡托大学毕业证成绩单原版一比一定制(Waikato毕业证书)新西兰怀卡托大学毕业证成绩单原版一比一
定制(Waikato毕业证书)新西兰怀卡托大学毕业证成绩单原版一比一Fs
 
办理学位证(UoM证书)北安普顿大学毕业证成绩单原版一比一
办理学位证(UoM证书)北安普顿大学毕业证成绩单原版一比一办理学位证(UoM证书)北安普顿大学毕业证成绩单原版一比一
办理学位证(UoM证书)北安普顿大学毕业证成绩单原版一比一A SSS
 
Back on Track: Navigating the Return to Work after Parental Leave
Back on Track: Navigating the Return to Work after Parental LeaveBack on Track: Navigating the Return to Work after Parental Leave
Back on Track: Navigating the Return to Work after Parental LeaveMarharyta Nedzelska
 
Ethics of Animal Research Laika mission.ppt
Ethics of Animal Research Laika mission.pptEthics of Animal Research Laika mission.ppt
Ethics of Animal Research Laika mission.pptShafqatShakeel1
 
办澳洲詹姆斯库克大学毕业证成绩单pdf电子版制作修改
办澳洲詹姆斯库克大学毕业证成绩单pdf电子版制作修改办澳洲詹姆斯库克大学毕业证成绩单pdf电子版制作修改
办澳洲詹姆斯库克大学毕业证成绩单pdf电子版制作修改yuu sss
 
办理(NUS毕业证书)新加坡国立大学毕业证成绩单原版一比一
办理(NUS毕业证书)新加坡国立大学毕业证成绩单原版一比一办理(NUS毕业证书)新加坡国立大学毕业证成绩单原版一比一
办理(NUS毕业证书)新加坡国立大学毕业证成绩单原版一比一F La
 
Digital Marketing Training Institute in Mohali, India
Digital Marketing Training Institute in Mohali, IndiaDigital Marketing Training Institute in Mohali, India
Digital Marketing Training Institute in Mohali, IndiaDigital Discovery Institute
 
Gurgaon Call Girls: Free Delivery 24x7 at Your Doorstep G.G.N = 8377087607
Gurgaon Call Girls: Free Delivery 24x7 at Your Doorstep G.G.N = 8377087607Gurgaon Call Girls: Free Delivery 24x7 at Your Doorstep G.G.N = 8377087607
Gurgaon Call Girls: Free Delivery 24x7 at Your Doorstep G.G.N = 8377087607dollysharma2066
 
定制(UQ毕业证书)澳洲昆士兰大学毕业证成绩单原版一比一
定制(UQ毕业证书)澳洲昆士兰大学毕业证成绩单原版一比一定制(UQ毕业证书)澳洲昆士兰大学毕业证成绩单原版一比一
定制(UQ毕业证书)澳洲昆士兰大学毕业证成绩单原版一比一lvtagr7
 
定制(UOIT学位证)加拿大安大略理工大学毕业证成绩单原版一比一
 定制(UOIT学位证)加拿大安大略理工大学毕业证成绩单原版一比一 定制(UOIT学位证)加拿大安大略理工大学毕业证成绩单原版一比一
定制(UOIT学位证)加拿大安大略理工大学毕业证成绩单原版一比一Fs sss
 
Escorts Service Near Surya International Hotel, New Delhi |9873777170| Find H...
Escorts Service Near Surya International Hotel, New Delhi |9873777170| Find H...Escorts Service Near Surya International Hotel, New Delhi |9873777170| Find H...
Escorts Service Near Surya International Hotel, New Delhi |9873777170| Find H...nitagrag2
 
原版快速办理MQU毕业证麦考瑞大学毕业证成绩单留信学历认证
原版快速办理MQU毕业证麦考瑞大学毕业证成绩单留信学历认证原版快速办理MQU毕业证麦考瑞大学毕业证成绩单留信学历认证
原版快速办理MQU毕业证麦考瑞大学毕业证成绩单留信学历认证nhjeo1gg
 
办理老道明大学毕业证成绩单|购买美国ODU文凭证书
办理老道明大学毕业证成绩单|购买美国ODU文凭证书办理老道明大学毕业证成绩单|购买美国ODU文凭证书
办理老道明大学毕业证成绩单|购买美国ODU文凭证书saphesg8
 
定制(SCU毕业证书)南十字星大学毕业证成绩单原版一比一
定制(SCU毕业证书)南十字星大学毕业证成绩单原版一比一定制(SCU毕业证书)南十字星大学毕业证成绩单原版一比一
定制(SCU毕业证书)南十字星大学毕业证成绩单原版一比一z xss
 
Black and White Minimalist Co Letter.pdf
Black and White Minimalist Co Letter.pdfBlack and White Minimalist Co Letter.pdf
Black and White Minimalist Co Letter.pdfpadillaangelina0023
 
Ch. 9- __Skin, hair and nail Assessment (1).pdf
Ch. 9- __Skin, hair and nail Assessment (1).pdfCh. 9- __Skin, hair and nail Assessment (1).pdf
Ch. 9- __Skin, hair and nail Assessment (1).pdfJamalYaseenJameelOde
 
Drawing animals and props.pptxDrawing animals and props.pptxDrawing animals a...
Drawing animals and props.pptxDrawing animals and props.pptxDrawing animals a...Drawing animals and props.pptxDrawing animals and props.pptxDrawing animals a...
Drawing animals and props.pptxDrawing animals and props.pptxDrawing animals a...RegineManuel2
 
定制(ECU毕业证书)埃迪斯科文大学毕业证毕业证成绩单原版一比一
定制(ECU毕业证书)埃迪斯科文大学毕业证毕业证成绩单原版一比一定制(ECU毕业证书)埃迪斯科文大学毕业证毕业证成绩单原版一比一
定制(ECU毕业证书)埃迪斯科文大学毕业证毕业证成绩单原版一比一fjjwgk
 

Recently uploaded (20)

LESSON O1_The Meaning and Importance of MICE.pdf
LESSON O1_The Meaning and Importance of MICE.pdfLESSON O1_The Meaning and Importance of MICE.pdf
LESSON O1_The Meaning and Importance of MICE.pdf
 
定制(Waikato毕业证书)新西兰怀卡托大学毕业证成绩单原版一比一
定制(Waikato毕业证书)新西兰怀卡托大学毕业证成绩单原版一比一定制(Waikato毕业证书)新西兰怀卡托大学毕业证成绩单原版一比一
定制(Waikato毕业证书)新西兰怀卡托大学毕业证成绩单原版一比一
 
办理学位证(UoM证书)北安普顿大学毕业证成绩单原版一比一
办理学位证(UoM证书)北安普顿大学毕业证成绩单原版一比一办理学位证(UoM证书)北安普顿大学毕业证成绩单原版一比一
办理学位证(UoM证书)北安普顿大学毕业证成绩单原版一比一
 
Back on Track: Navigating the Return to Work after Parental Leave
Back on Track: Navigating the Return to Work after Parental LeaveBack on Track: Navigating the Return to Work after Parental Leave
Back on Track: Navigating the Return to Work after Parental Leave
 
Ethics of Animal Research Laika mission.ppt
Ethics of Animal Research Laika mission.pptEthics of Animal Research Laika mission.ppt
Ethics of Animal Research Laika mission.ppt
 
办澳洲詹姆斯库克大学毕业证成绩单pdf电子版制作修改
办澳洲詹姆斯库克大学毕业证成绩单pdf电子版制作修改办澳洲詹姆斯库克大学毕业证成绩单pdf电子版制作修改
办澳洲詹姆斯库克大学毕业证成绩单pdf电子版制作修改
 
办理(NUS毕业证书)新加坡国立大学毕业证成绩单原版一比一
办理(NUS毕业证书)新加坡国立大学毕业证成绩单原版一比一办理(NUS毕业证书)新加坡国立大学毕业证成绩单原版一比一
办理(NUS毕业证书)新加坡国立大学毕业证成绩单原版一比一
 
Digital Marketing Training Institute in Mohali, India
Digital Marketing Training Institute in Mohali, IndiaDigital Marketing Training Institute in Mohali, India
Digital Marketing Training Institute in Mohali, India
 
Gurgaon Call Girls: Free Delivery 24x7 at Your Doorstep G.G.N = 8377087607
Gurgaon Call Girls: Free Delivery 24x7 at Your Doorstep G.G.N = 8377087607Gurgaon Call Girls: Free Delivery 24x7 at Your Doorstep G.G.N = 8377087607
Gurgaon Call Girls: Free Delivery 24x7 at Your Doorstep G.G.N = 8377087607
 
定制(UQ毕业证书)澳洲昆士兰大学毕业证成绩单原版一比一
定制(UQ毕业证书)澳洲昆士兰大学毕业证成绩单原版一比一定制(UQ毕业证书)澳洲昆士兰大学毕业证成绩单原版一比一
定制(UQ毕业证书)澳洲昆士兰大学毕业证成绩单原版一比一
 
定制(UOIT学位证)加拿大安大略理工大学毕业证成绩单原版一比一
 定制(UOIT学位证)加拿大安大略理工大学毕业证成绩单原版一比一 定制(UOIT学位证)加拿大安大略理工大学毕业证成绩单原版一比一
定制(UOIT学位证)加拿大安大略理工大学毕业证成绩单原版一比一
 
Escorts Service Near Surya International Hotel, New Delhi |9873777170| Find H...
Escorts Service Near Surya International Hotel, New Delhi |9873777170| Find H...Escorts Service Near Surya International Hotel, New Delhi |9873777170| Find H...
Escorts Service Near Surya International Hotel, New Delhi |9873777170| Find H...
 
FULL ENJOY Call Girls In Gautam Nagar (Delhi) Call Us 9953056974
FULL ENJOY Call Girls In Gautam Nagar (Delhi) Call Us 9953056974FULL ENJOY Call Girls In Gautam Nagar (Delhi) Call Us 9953056974
FULL ENJOY Call Girls In Gautam Nagar (Delhi) Call Us 9953056974
 
原版快速办理MQU毕业证麦考瑞大学毕业证成绩单留信学历认证
原版快速办理MQU毕业证麦考瑞大学毕业证成绩单留信学历认证原版快速办理MQU毕业证麦考瑞大学毕业证成绩单留信学历认证
原版快速办理MQU毕业证麦考瑞大学毕业证成绩单留信学历认证
 
办理老道明大学毕业证成绩单|购买美国ODU文凭证书
办理老道明大学毕业证成绩单|购买美国ODU文凭证书办理老道明大学毕业证成绩单|购买美国ODU文凭证书
办理老道明大学毕业证成绩单|购买美国ODU文凭证书
 
定制(SCU毕业证书)南十字星大学毕业证成绩单原版一比一
定制(SCU毕业证书)南十字星大学毕业证成绩单原版一比一定制(SCU毕业证书)南十字星大学毕业证成绩单原版一比一
定制(SCU毕业证书)南十字星大学毕业证成绩单原版一比一
 
Black and White Minimalist Co Letter.pdf
Black and White Minimalist Co Letter.pdfBlack and White Minimalist Co Letter.pdf
Black and White Minimalist Co Letter.pdf
 
Ch. 9- __Skin, hair and nail Assessment (1).pdf
Ch. 9- __Skin, hair and nail Assessment (1).pdfCh. 9- __Skin, hair and nail Assessment (1).pdf
Ch. 9- __Skin, hair and nail Assessment (1).pdf
 
Drawing animals and props.pptxDrawing animals and props.pptxDrawing animals a...
Drawing animals and props.pptxDrawing animals and props.pptxDrawing animals a...Drawing animals and props.pptxDrawing animals and props.pptxDrawing animals a...
Drawing animals and props.pptxDrawing animals and props.pptxDrawing animals a...
 
定制(ECU毕业证书)埃迪斯科文大学毕业证毕业证成绩单原版一比一
定制(ECU毕业证书)埃迪斯科文大学毕业证毕业证成绩单原版一比一定制(ECU毕业证书)埃迪斯科文大学毕业证毕业证成绩单原版一比一
定制(ECU毕业证书)埃迪斯科文大学毕业证毕业证成绩单原版一比一
 

Selenium Interview Questions & Answers

  • 1. Selenium Interview Questions with Answers (Coding based)
  • 2. Question Question How do you take a screenshot in Selenium?
  • 3. Answer File src = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE); FileUtils.copyFile(src, new File("screenshots/error.png")); Use TakeScreenshot Interface, typecasted to driver instance. 1. Copy Taken screen shot to any file on hard drive.
  • 4. Question How do you simulate mouse operations in Selenium?
  • 5. Answer To simulate mouse operations in Selenium, • Choose Actions class under selenium > operations package. Ii is used for mouse operations. It is a a user-facing API for emulating complex user gestures. • Selenium recommends use of this class for Mouse operations. • It implements the builder pattern: Builds a Composite Action containing all actions specified by the method calls.
  • 6. Question How to select drop down values in Selenium? Approaches to select drop down?
  • 7. Answer We use Select class under selenium > support > ui package to select and deselect in a dropdown list box. There are multiple approaches to do so as mentioned: Approaches 1. selectByIndex(int index) Select the option at the given index. 2. selectByValue(java.lang.String value) Select all options that have a value matching the argument. 3. selectByVisibleText(java.lang.String text) Select all options that display text matching the argument.
  • 8. Question How do you simulate Special Keys in Selenium like Ctrl , Alt etc.
  • 9. Answer Enum Keys is used for this purpose. This is part of selenium package. Keys.chord(Keys.CONTROL,"c")).perform() The above code will simulate the behavior of CTRL + C
  • 10. Question Tell me how do you work with multiple windows in Selenium?
  • 11. Answer Some web applications have many frames or multiple windows. WebDriver supports moving between named windows using the “switchTo” method: driver.switchTo().window("windowName"); You can pass a “window handle” to the “switchTo().window()” method. Knowing this, it’s possible to iterate over every open window like so: for (String handle : driver.getWindowHandles()) { driver.switchTo().window(handle); }
  • 12. Question How do you handle HTML Tables in Selenium?
  • 13. Answer 1.’table’ tag defines html table. 2.’tbody’ tag defines container for rows and columns. 3.’tr’ defines rows in an html table. 4.’td’/’th’ define column of an html table. Use tagname locator strategy to identify and extract data
  • 14. Question Which is the most effective locator strategy in Selenium?
  • 15. Answer CSS works with simple attributes like ID and Class, XPATH will traverse the DOM top down to work with nested elements, so CSS is faster CSS are clear and concise. Also Selectors are more readable.
  • 16. 16 THANKS! Any questions? You can contact us at ▪ info@techcanvass.com ▪ 022-40155 175 ▪ 7738 7731 08 www.techcanvass.com