SlideShare a Scribd company logo
1 of 301
Download to read offline
1) Which of the following field/column for requirements in excel format is used
to map the requirements folder in ALM?
Ans: Path
2) Which of the following best defines ALM as an integrated repository?
Ans: Link between requirements with releases & cycles
Link between defects with releases & cycles
3) By default, what does application life cycle management (ALM) assign when a
new defect is created?
Ans: A unique defect IO
4) Which of the following sections allows you to view coverage by cycle?
Ans: Requirement coverage
5) How many defects can be associated with a requirement?
Ans: Multiple defects
6) Which of the following elements of JMeter determines the order in which the
requests have to get processed?
Ans: Logic controllers
7) Which one of the following is not a controller in JMeter?
Ans: Condition controller
8) Which of the following represents a process where samplers are executes with
multiple sets of user input data?
Ans: Parameterization
9) Which of the following statements is true about pre-processors?
Ans: Pre-processors execute before the sampler requests are executed in the
test plan (only a)
10) Which assertion is used to test whether the API server response was
received within a given amount of time or not?
Ans: Duration
11) Which of the following defect states is marked by the developer when he is
analyzing the defect description?
Ans: Open
12) Which of the following test defines “Verification” & “Validation”?
Ans: Verification: Lalitha is reviewing the test script conduct by raju
Validation: Raju is updating the requirements traceability matrix for the
requirement coverage
13) John has raised a high priority defect in the morning and is waiting for the
fix to be completed. At 5pm he got a fix from the developer. Now he also need
to check the fix implemented does not introduce any new defects on the
system. What type of testing is he performing?
Ans: Regression testing
14) Consider the below html code snippet
Email:<label id=”Email” class=”Style1” name=”input”> Which of the best locator
to identify the Email web element?
Ans: By id (“Email”)
15) Which method in the web driver library is used to get the attribute value of
a web element?
Ans: getAttribute(“AttributeName”)
16) Sarah is coding an automation script, where she has to validate the price of
the holiday package based on the drag and drop of island only from the menu.
The price is fetched from the server and displays without reloading the
webpage. Which web driver library class has the pre defined conditions for
handling dynamic waits in selenium webdriver library?
Ans: WebDriver wait
17) Which of the following statement(s) is/are about the extent reports?
Ans: All of the above : Extent reports are customisable HTML Reports
Extent reports can be integrated with Selenium webdriver using TestNG/Junit
test frameworks
Extent reports can add events, screenshots, tags, devices, and any other related
information about test environment
18) Sean is coding an automation script for emulating user actions by mouse
using the webdriver library. Assist sean to choose the correct syntax to create
an object for actions class from the following
Ans: Actions act=new Actions(driver instance)
19) Which Java interface is used to capture screenshot of a webpage using
webdriver API?
Ans: TakeScreenshot
20) Sean wants to switch to multiple frames on a webpage when an operation
is completed on a frame an test flow needs to move to another frame, calling
the driver.SwitchTo().frame() immediately will not move the context to the
next frame which is at the same level in DCM. The test will first need to switch
to the main document and then activate the desired frame which method is
used to switch back to the main document from the frame?
Ans: driver.SwithTo().defaultContent()
21) Samatha wants to write an automation script that determines the count of
hobbies check boxes. These check boxes have a name attribute as ”hobbies”.
Assist Samatha by choosing the correct command
Ans: Driver.dindElements.By.name(“hobbies”).size()
22) Samatha is automating a test scenario. This scenario involves a pop up of a
confirmation window. She wants to interact with the pop up window and
decline the confirmation pop-up window that shows a message “Do you want
to cancel the payment?”. Choose correct code
Ans: Driver.SwithchTo().alert().dismiss()
23) Sarah is coding an automation script to switch to frame in a web
application. Help her to switch a particular frame on a web page using the
window library. She wants to interact with the pop up window and decline the
confirmation pop up window show a message “Do you want to cancel the
payment?”. Assist Samantha to interact with
Ans: Driver.SwitchTo().frame(int index)
Driver.SwitchTo().frame(String name or id)
24) Which of the following is correct about generating an XML Suite file is
TestNG for Test Suite execution?
Ans: Test NG XML suite file
Can be generated at the time of creating TestNG class
TestNG XML suite file can be generated using convert to TestNG option in Eclipse
after a java code
25) Sarah is designing an automation script using descriptive programming in
UFT for a web based Flight GUI application. Assist sarah with a tool to identify
the property of the test scripts
Ans: Object Spy
26) Sarah wants to slice a text to perform a test on a message. She used the
split function in VB Scripting to chop the strings. Predict the output for the
below code
Arr=Split(“this ”is ”VB”Scripting”,” ‘ ”)
Msgbox arr(2)
Ans: VB
27) In UFT which type of variable can be accessed by all actions, function
libraries and tests that have a global scope?
Ans: Environment variable
28) Which of the following types of applications can be tested using UFT?
Ans: Web app, SOAP and REST APIs
29) A retail application generates an order id on successful order placing. Order
id follows the pattern. Starts with TXN, followed by 3 digit number and ends
with any capital alphabet
Ans: ^TXNd[3]{A-Z}$
30) Jack wants to apply checkpoint in an existing test script. He decides to use
keyword view to insert checkpoint. Which all checkpoints can be inserted using
keyword view?
Ans: Only standard
31) What type of action can we create if others want to reuse that action, but
at the same time, it should be non-editable for others?
Ans: Reusable action
32) Chetan wants to add some additional information like the environment for
test execution, which method can be used to add the information in the test
method?
Ans: Add Run Information
33) Predict the output for the below code snippet Msgbox (“UFT” &
String(3,”T”))
Ans: 6
34) Many wants to add the HTML report snippet to have better clarity in the
test results. Which Reporter object method can be added to achieve the task?
Ans: ReportHTMLEvent
35) There are various elements in a SOAP message. Which element of the SOAP
message shows error message and status information?
Ans: Fault
36) Lisa is a new joiner to cucumber project assigned to execute the scenarios
marked as both OAT and UAT tags. Which of the following will assist Lisa to
execute the desired Scenario using tags from Cucumber option?
Ans: @CucumberOptions(tags=(“@OAT”,”@UAT”))
37) Henry wants to write some comments in the feature file. Which character
command is used to define comments in the feature file?
Ans: #
38) Kevin is creating a feature file with multiple scenarios. He wants to apply
multiple tags to a scenario. Which of the following best requirements the
technique to apply multiple tag names?
Ans: @Tag1,@Tag2
39) Which statements are true about feature file?
Ans: only 1, 2 & 3 : A feature file contains multiple scenarios
Feature Gherkin keyword is always written as first high level keyword in a feature
file
There can be multiple feature file in a project
40) No question
@when(“Kevin enters quantity as{int}item(3)”)
@Then(“Shopping cart icon shows {int}”)
41) Which of the following is not a valid element in the JMeter test plan?
Ans: Annotation
42) Which of the following is past processor in JMeter ?
Ans: Regular expression Evaluator
43) Which of the following parameters can be configured using a thread group?
Ans: Ramp-up period
Loop count
44) Which among the following is an invalid controller in JMeter?
Ans: State controller
45) Which of the following fields in the defect log helps the tester to prioritize
and fix the defect?
Ans: Severity
46) Sean is coding an automation script to test a web application. He has to
store the largest link in a java variable using a driver find element() method.
Suggest Sean with a compatible return type to store the logout test object?
Ans: WebElement
47) James want to automate the selection of ID proofs drop down box in the
web application . He has to verify the drop down box has a selection of more
than one option. Which of the following method is suggested to JMeter?
Ans: Ismultiple()
48) When verification fails in TestNG. What forces the test to stop execution
and mark as fail?
Ans: Assertion Fail
49) Kavin wants to generate extensive report for the test automation project.
He decides to use Extent reports library. Which class in this library is used to
create labels, code blocks and labels in the report?
Ans: Markup Helper
50) Sean configured this project for the test Suite execution using TestNG. He
wants to perform parallel execution using TestNG. Which attribute represents
the parallel execution of the test cases?
Ans: Parallel=”tests”
51. Kevin is using CSS selector as a locator strategy for the following element <h1
id =”msg1” name=”success”>Registration completed</h1>. He must identify the
element efficiently.
Ans: .By CSS Selector(“h1[id=’msg01’]”)
.By CSS Selector(“h1[id=’msg01’][name=’success’]”)
52. There is an element on the webpages when inspected on the browser it looks
like <div call=”errorMsg”>Error Message</div>. James wants to use selenium
locations to identify the element. Choose the correct set of commands to locate
the elements efficiently.
Ans: By CSS Selector(“div.errorMsg”)
53. Sarah wants to automate the selection of only one option from a dropdown
box as shown below
<html>
<body>
<select multiple>
<option value=”web”>html</option>
<option value=”prog”>python</option>
<option value=”prog”>java</option>
<option value=”prog”>python</option>
<option value=”prog”>java</option>
</select>
</body>
</html>.
Sarah has to select only the fourth option,i.e,python from the options field.
Ans: Select By Index()
54. Identify the valid statement from the below given options.
Ans: Browser(name i=Demowebshop).page(page i=”.*”).WebEdit(“Emailiq”) Set
Prince
55. Neha is an automation tester working for TestMe project. She wants to log
some information in the UFT tet result pane. Which reporter object method is
more relevant in the situation?
Ans: MicDone
56. UFT supports various debugging techniques that help us in finding the issues
in the automation script. Which technique allows us to change the value of local
variables at runtime to understand the behaviour?
Ans: Console
57. Which of the following statements regarding actions in UFT is incorrect?
Ans: In actions, parameters are passed by value and by
58. To execute a cucumber scenario, which file(s) are important and must be
created in the maven project?
Ans: .feature file, .step definition
59. Henry wants to generate JSON reports on the execution of Test Runner in
cucumber. Assert Henry with the right option to configure the JSON report
generation in @Cucumber options?
Ans: @Cucumber Options({plugin=pretty,”html:report.html”})
60. Henry has created a feature file with tagged scenarios. He wants to execute all
the scenarios excluding “SevereTag” scenarios. What command should he use in
cucumber options for TestRunner class?
Ans: tags=(“~@SevereTag”)
61. Which of the following will control the amount of time Jmeter will execute a
test plan?
Ans: Test duration
62. Which of the following types of applications can be tested using Jmeter?
Ans: All of these
63. Jude is testing the login page of an application that contains 10 fields. He has
analyzed the data dictionary to derive the test data for the login page. He has
tested the application with all the combinations as it was a mandatory task
required for the project. However, he is sure that 0% of defects do not guarantee
the process success from the customers perspective, please predict the testing
principle that he is referring to in the above statement?
Ans: Exhausting testing not possible
64. Which of the following styles of writing test scenario ids will represent clearly
the referenced test scenario and help the testing team for tracking purposes?
Ans:
65. Sean is coding to automate a test scenario in which he has to click on a
dynamic link to navigate to the shopping cart page.
The web element looks like <a href=”icart.jsp? params”>cart[19]</a>. Which
locator is most recommended for the scan to identify the cart web element for all
test iterations ?
Ans: By.partial link Text()
66. Kevin wants to fetch all the data from the country dropdown menu and verify
the data against data from the database. He is looking into the library for a
method to fetch all the data from the country dropdown box .Which method
helps Kevin?
Ans: get options()
67. What does double forward slash // represent in xpath selenium locations?
Ans: relative xpath
68. Kevin is planning to write automation script for below scenario.
Given the user is on the payment page. He views a textbox with attribute values .
“Enter Mobile Number” written in the box. The user must enter the mobile
number in the box to proceed. Please choose the correct command to help Kevin
in automating the scenario. Assume the textbox element is already identified and
stored in mobile txt box variable .
Ans: mobileTxtBox.sendKeys(“xxxxxxxxxx”)
69. Henry is designing a script and using CSS selector as the locator strategy. He
must locate the element efficiently. The element inspected looks like <input
id=”new password” type=”password”>.
Ans: By CSS Selector(“input[id=password]”)
70. Kevin is designing an automation test, where test data is specified in an
external excel file. Which command will be helpful to write the data into a cell of
the excel file? Assume c1 is the cell object.
Ans: c1.SetCellValue(‘data’)
71. <html>
<body>
<ul class = ”cities” >
<li>Bangalore</li>
<li>Chennai</li>
<li>Mumbai</li>
<li>Bangalore</li>
<li>Pune</li>
</ul>
</body>
</html>
Sarah wants to locate the 3rd child element i.e. Hyderabad.Suggest the
appropriate locator strategy by Sarah.
ANS- CSS=”ul.cities.li inth of type(“Hyderabad”)”
72. UFT supports various synchronization techniques that helps us to manage
web applications. Which technique is applied only to webpages and browsers ?
ANS- Sync.
73. Consider a test String to be “order 200 completed”. which of the below
regular expression(s) will not match the given string?
ANS- order [0-9]+Completed
74. Henry had bined a project team. The team is using the BDD framework for
effective testing . Henry must understand keywords in Cucumber. Which gherkin
keyword indicates the pre-conditions / pre- requests steps in a feature file?
ANS- Given
75. Samantha has created a feature file in a project. she wants to configure the
Test Runner class using feature files/glue tags. Which of the following is the
correct set annotations to be used in the test runner?
ANS- @Runwith ; @Cucumber options.
76. Write in corect order
a. Triggers the build
b. Open reports to see the latest test results
c. Jenkins checks the Git Repository periodically to detect changes in build
project.
d. The build is successful / Failure.
e. Testers/ Developers commits source code changes to the shared Git
Repository
ANS-
77. Which of the following elements of Jmeter executes after the sampler
requests are executed in the test plan?
ANS- Post Processors.
78. Sarah is coding in a test scenario, in which she must fetch the booking id as a
text message from the span element
The web element looks like <Space> order completed with Booking
id:6665<Space>
Help Sarah to find a method from the webdriver library to fetch the booking ID?
Ans- get Text();
79. James is automating a script and using CSS Selector as a locator. What are the
primitive types for designing the CSS selector?
ANS- .id, . Attribute, .innerText()
80. Which expression is used in CSS Selectors to match the attribute value with a
prefix?
ANS- ^=
81. Sean is coding an automation Script to launch the web application on a
browser window. Which of the following listed option(s) will help Sean to launch
the designed application on a web browser in Selenium?
ANS- .driver.get(“URL”) , .driver.navigate().to(“URL”)
82. Which date format is used to customize the system date to Year-Month-day
format?
For example 2019-04-24
ANS- new Simple Date Format(“YYYY-MM-dd”).
83. Select the correct order of execution of annotations, as per the life cycle of
Test NG which can be applied for test methods along with before XXXX-after
XXXX methods
ANS- Before test, Before class, Before method , test , After method, After class ,
After test .
84. Sam has created a Test NG project with below specified Test class
Public class Test class
{
@Test (Priority = 1)
Public void method 1() (-----)
@Test
Public void method 3() (-----)
@Test
Public void method 2() (-----)
@Test
Public void method 4() (-----) }
ANS- Method 2 - Method - 3 Method - 1 Method – 4
85. What are the various status options available in the Extent Reports library?
ANS- PASS , FAIL , SKIP , FATAL , ERROR , Warning , INFO
86. Sarah wants to perform a few scenarios using a do-while loop in UFT. She has
written the below code. Predict the number of times the loop will be executed ?
i=10
Do while (i<5)
msg box i
i=i+1
loop
ANS- Does not execution in the condition
87. Predict the Output for the below code snippet
Dim Str
Str = Str Reverse (mid (“Unified functional testing”,4,9))
Print Str
ANS- couf deif
88. Predict the Output for the below code snippet
Dim a,b
a= ”vbscript”
b= Left (Right (a,3) 2)
print
ANS- ip
89. Which of the following reports can be generated using plugins from
Cucumber options?
ANS- All of the above
90. James wants to design a scenario in a feature file, in which the complete
scenario runs multiple times for different data sets . Suggest James with a Gherkin
keyword to activate drop-down testing in the feature file ?
ANS- Use Scenario outline.
91. Jack had created the feature file with the below mentioned scenarios as
shown below:
@smoke
Scenario: This is the first scenario
@crash
Scenario: This is the second scenario
In test runner class, Jack mentioned @cucumberoptions (tags=(“smoke”)) predict
which scenario is/are gets executed
Ans: Execute first scenario
92.Which of the following is the logical container that contains all the elements
which drive the performance test?
Ans: Load Testing
93. Which of the following assertions is not applied in Jmeter?
Ans: web
94. Which of the following is an invalid configuration element in Jmeter?
Ans: FTP cookie manager
95. Which of the following input documents is used to create test scenarios and
conditions?
Ans: Use cases
96. Which of the following Java classes are from the extent API library?
Ans: ExtentReports, Status
97. Sean is coding to automate a web application using the webDriver library. He
had set the implicit wait of 30 seconds. However, the webelement was found
within 10s . Will the webdriver wait for further 20 seconds before executing the
next line of code?
Ans: Yes, webDriver will wait 20 more seconds.
98. Which method is used in the Apache POI library to fetch the cell value from a
row? Identify the correct format of invoking the library functions to get the value
from the cell
Ans: sheet.getRow(rowno).getcell(col no).getStringCellValue()
99. Sarah is coding to automate script to switch to multiple windows in a web
application. She has to store all the window instances in a java variable which is
retrived by driver.getWindowHandles(). Suggest sarah with a compatable return
type to store the window references.
Ans: list <string>
100. Mary is struggling to find a suitable simple wild cart character that matches
any single character . Please suggest to her which of the following characters
many be relevant to her search
Ans: .(wildcard character)
101. Which Gherken keyword is used to create/execute as a common given step
for all the scenarios in the feature table?
Ans; Background
102. sarah has her code in git local repository, but her team lead had pushed the
new changes into the remote repository, Which git command would you
recommend Sarah with new changes into her working copy?
Ans: put
103.
104. Which parameter types in cucumber expressions matches text without white
space?
Ans:{ word}
105. Sean is automating a test scenario in which he has to fetch the URL of the
webpage using webDriver API. Suggest a method fo Sean to get the link address
Ans: getCurrentURL()
106. Ans: No such element Exception
107. Sean is performing verification using assert class functions from TestNG.
Suggest him the correct method to verify the reference/address of the two
objects to be identical?
Ans: assertSame(object1,object2)
108. Sam is designing an automation test where test data is specified in an
external excel file. Which command will be helpful to get access to the 2nd
sheet
of the excel file. Assume web is the writebook object
Ans: who.getSheetA1(1)
110. Which of the following is a listener in JMeter?
Ans: All the above (Assertion results, Monitor results, Aggregate report)
111. Sarah is coding to automate a scenario for the selection of the “from Cities”
drop down box on the flight booking application web page, which class is used?
Ans: Select Class
112. Which of the following elements of JMeter helps to validate whether on
application is returning on excepted response or not?
Ans: Assertion
113. Which controller in JMeter you organize the samples & other logic
controllers?
Ans: Simple
114.
Ans: Once Only
115.
Ans: WebElement element 01 = driver.findelement(By.id(“Searchbox”));
116.
Ans: Test Driven Development
117. Trigger all scenarios
Ans: Feature file
118. BDD Process
Ans: 2-3-1-4-5
119. Selenium Grid (Multiple Box)
120. standard
Standard, Text and Bitmap (Active Screen)
1. Sarah is coding in a test scenario, in which she must fetch the
booking id as a text message from the span element.
The web element looks like
<Space> order completed with Booking id:6665<Space>
Help Sarah to find a method from the webdriver library to fetch the
booking ID?
Ans - getText();
2. James is automating a script and using CSS Selector as a locator.
What are the primitive types for designing the CSS selector?
ANS - .id, .Attribute, .innerText()
(Explanation - There are 5 types of CSS Selectors in Selenium tests-
ID, Class, Attribute, Sub-String, Inner Text)
3. Which expression is used in CSS Selectors to match the attribute
value with a prefix?
ANS- ^=
(Explanation - [attr^=value] Represents elements with an attribute name
of attr whose value is prefixed (preceded) by value.)
4. Write in correct order.
a. Triggers the build
b. Open reports to see the latest test results.
c. Jenkins checks the Git Repository periodically to detect changes in
build project.
d. The build is successful / Failure.
e. Testers/ Developers commits source code changes to the shared Git
Repository.
ANS- e,c,a,d,b
5. Kevin has designed a TestClass with the following methods:
public class TestClass {
@Test
public void testMehod1() {int a = 78;}
@Test
public void testMehod2() {Assert.assertEquals(67, 76);}
public void testMehod3() {System.out.println("Welcome");}
@Test
public void testMehod4(){Assert.assertEquals("Hello”, “Hello");}
}
Kevin executes the above TestClass as a TestNG test. Which of the
following correctly represents the test result?
ANS - Total tests run: 3, Passed: 2, Failed: 1
6. Identify the correct way of launching the Chrome browser through
WebDriver instance with the correct property.
ANS -
System.setProperty("webdriver.chrome.driver","src/test/resources
/chromedriver.exe");
WebDriver driver = new ChromeDriver();
7. Samantha wants to write an automation script that determines the
count of Hobbies checkboxes. These checkboxes have a name
attribute as “hobbies”. Assist Samantha by choosing the correct
command.
ANS –
driver.findElements(By.name(“hobbies”)).size()
8. Henry is designing a script and using CSS Selector as the locator
strategy. He must locate the element effectively. The element
inspected looks like:
<input id=“newPassword” type=“password”>
ANS - By.cssSelector("input[id='newPassword']")
By.cssSelector("input[id$='Password']")
9. Kevin is automating a test scenario. In which he wants to locate an
element with the class attribute “classg1 jkyu_90”. Assist Kevin in
setting up the correct locator for the element.
ANS - By.className(“classg1”)
10. Select the correct order of execution of annotations, as per the life
cycle of the TestNG which can be applied for test methods along
with beforeXXXX – afterXXXX methods.
ANS - @BeforeTest, @BeforeClass, @BeforeMethod, @Test,
@AfterMethod, @AfterClass, @AfterTest
11. Sean is coding an automation script for emulating user actions by
mouse actions using webdriver library. Assist Sean to choose the
correct syntax to create an object for Actions class from the
following options.
ANS -
Actions act = new Actions(driverinstance)
Actions act = new Actions()
Actions act = (Actions)driverinstance
12. Kevin is using a CSS Selector as a locator strategy for the following
element:
<h1 id=“msg01” name=“success”>Registration completed</h1>
He must identify the element effectively.
ANS –
By.cssSelector(“h1[id=‘msg01’]”)
By.cssSelector(“h1[id=‘msg01’][name=‘success’]”)
13. Which of the following method causes a thread to pause for a
specified duration?
pause()
14. What are the features of TestNG?
Annotation Based
Parallel Testing
Reporting
15. __ Closes all the associated windows of webdriver.
Quit()
16. Which of the following components identify the artifacts in
Maven?
Artifact Id
Group ID
Version
17. What is the correct Syntax to instantiate a Firefox Browser
session?
WebDriver driver = new FirefoxDriver();
18. Consider there are three frames in a web page, which method
below is used to comeback to main window before switching to any
frame?
switchTo.defaultContent()
19. Which of the following methods will be used to handle an alert
dialog box?
alert.accept()
20. Which of the given options are structure-based locators?
CSS
XPATH
21. Which of the following command should be used to extract more
than one element on web page?
findElements
22. Which of the following is a term used in thee testing of computer
software to describe testing done using a table of conditions directly
as test data inputs?
Data Driven Testing
23. getText() method extracts the text from an element.
True
24. Sean is coding to automate a web application using the webDriver
library. He had set the implicit wait of 30 seconds. However, the
webelement was found within 10s. Will the webdriver wait for
further 20 seconds before executing the next line of code?
YES , webDriver will wait 20 more seconds.
25. Sarah wants to automate the selection of only one option from a
drop-down box as shown below.
<html>
<body>
<select multiple>
<option value = “web”> html</option>
<option value = “prog”> python</option>
<option value = “prog”> java</option>
<option value = “prog”> python</option>
<option value = “prog”> java</option>
</select>
</body>
</html>
Sarah has to select only the fourth option i.e., python from the
option list .
selectByIndex()
26. Sean is automating a test scenario in which he has to fetch the URL
of the webpage using webDriver API. Suggest a method for Sean to
get the link address.
getCurrentURL()
27. Which method is used in the Apache POI library to fetch the cell
value from a row? Identify the correct format of invoking the
library functions to get the value from the cell.
sheet.getRow(rowno).getcell(col no).getStringCellValue()
28. Match the following tools with the correct description.
Tools Description
A. GIT 1. A cloud service for remote hosting of git
repositories. In addition to hosting your
code, the site helps manage software
development projects.
B. Git Lab 2. Open-Source platform or continuous
inspection of code quality to perform
automatic review with static analysis of
code to detect bugs.
C. SonarQube 3. Software that handles source code
versioning, letting you make and track
local file changes and share with remote
repository.
A-3, B-1, C-2
29. Sarah is coding an automation script to switch to IFRAME in a
web application .Which of the listed options(s) will help Sarah to
switch to a particular frame on a web page using the webdriver
library?
driver.switchTo().frame(int index)
driver.switchTo().frame(string nameOrld)
driver.switchTo().frame(WebElement frameElement)
30. Sean is coding an automated script to launch the web application
on a browser window. Which of the following listed option will help
Sean to launch the desired application on a web browser in
selenium?
driver.get(“URL”)
driver.navigate().to(“URL”)
31. Which of the following is correct about generating XML suite file
in TestNG for Test Suite Execution?
TestNG XML Suite file can be generated at the time of creating a
TestNG class.
TestNG XML Suite file can be generated using ‘convert to
TestNG’ option in Eclipse after a java class is created.
32. Sam is designing an automation test, where test data is specified in
an external excel file. Which command will be helpful to get across
to the 2nd sheet of excel file? Assume wb is the workbook object.
wb.getSheetAt(1)
33. Sarah is coding to automate script to switch to multiple windows in
a web application. She has to store all the window instances in a
java variable which is retrieved by driver.getWindowHandles().
Suggest Sarah with a compatible return type to store the window
references.
set <string>
34. When verification fails in TestNG, what forces the test to stop
execution and mark as Fail?
AssertionError
35. Samantha wants to automate selection of value from a drop-down
menu. When the element was Inspected. She found:
<html>
<body>
<select name=”jobrole”>
<Option value=”1”>Manager</option >
<option value=”2”>Lead</option>
<option value=”3”>Analyst</option>
</select>
</body>
<html>
Choose “lead” as the test data. Assist her by choosing the correct
options.
selectByIndex(1);
selectByVisibleText(“Lead”)
selectByValue(“2”)
36. In distributed version control system for SCM, which of the
following is not true?
Only online commits are allowed.
37. Which plugin can be used as an IDE(like Eclipse) extension that
helps to detect and fix quality issues of code written in
java/python/html/JavaScript/php?
Sonar Lint
38. Sarah is an Automation Engineer and wants to build a job from
Jenkins server. The Jenkins server is up and running. What is the
default port number that Sarah needs to remember to access the
Jenkins server with URL?
8080
39. Which of the following are supporting attributes for @Test?
priority
enabled
40. Identify the wait time method which is not the Selenium way to
handle synchronization in Test Automation.
Sleep()
41. Which of the following library is used for designing the test scripts
using the predefined classes, methods, and annotations?
TestNG Library
42. Sean is working on a Test Automation project; He is looking for
different strategies for identifying the elements/objects from the
web application using Selenium locators. Suggest Sean with the
available locators in Selenium.
By.id()
By.tagName()
By.partialLinkText()
(Explanation – SELENIUM Selectors - ID, Tag Name, Link Text,
Name, CSS Selector, Partial Link Text, Class Name, XPath)
43. Which of the following is used to pass data from a source to a
particular test method to replace the constant values with variables
in TestNG?
Data Provider
44. In the TestNG framework, which of the following contains
Single/Multiple Test Cases?
Test Suite
45. List out the operating systems that are supported by Selenium.
Windows, Linux, Mac, android & iOS
46. Sean is filling a web form with his contact details like email, phone
number, and address while performing registration to an event. He
clicked on submit button without entering the phone number and a
pop-up window appeared saying "Contact Number is required".
Identify the correct way to handle such pop-up windows using
Selenium WebDriver.
driver.switchTo().alert()
47. Identify the child tags that are required to add inside dependency
tag in order to download the desired libraries/jar from the maven
central repository without any errors.
groupId
version
artifactId
48. Sarah is coding an automation script to switch to frame in a web
application. Help her to switch a particular frame on a web page
using the window library. She wants to interact with the pop-up
window and decline the confirmation pop up window show a
message “Do you want to cancel the payment?”. Assist Samantha to
interact with
Driver.SwitchTo().frame(int index)
Driver.SwitchTo().frame(String name or id)
Driver.switchto().frame(webelement frameelement)
49. Testing an automation script to test a web application. He has to
store the Logout link in the using a driver.findElement() method.
Suggest Sean with a compatible return to leg out least object.
WebElement
50. James wants to automate the selection of ID proofs drop-down box
in the web application. He has to verify the drop-down has a
selection of more than one option. Which of the following method is
suggested to James?
isMultiple()
51. Kevin wants to generate extensive report for the test automation
project. He decides to use Extent reports library. Which class in
this library is used to create labels, code blocks and labels in the
report?
Markup Helper
52. Sarah is coding an automation script to switch to multiple windows
in a web application . She has to store all the window instance in a
java variable which is returned by driver.getWindowHandles().
Suggest Sarah with a compatible return type to store the window
References.
Set<String>
53. Sarah is coding an automation Script to locate a child element in
an unordered list. The list is given below:
<html>
<body>
<ul class=”cities”>
<li>Bangalore</li>
<li>Chennai</li>
<li>Hyderabad</li>
<li>Mumbai</li>
<li>Pune</li>
</ul>
</body>
</html>
Sarah wants to locate the 3rd child element i.e., Hyderabad.
Suggest the appropriate locator strategy for Sarah.
CSS = "ul.cities li:nth-of-type("Hyderabad")
54. Which java Enum is used to handle the keyboard strokes from web
driver library? Choose the most appropriate option.
Keys
55. There is an element on the web page when inspected on the
browser it looks like <div class=”errorMsg”>Error Message</div>
James wants to use selenium locators to identify the element.
Choose the correct set of commands to locate the element
effectively.
By.cssSelector(“div.errorMsg”)
56. George is reviewing the quality of the Java code given to him using
SonarQube and identified that the variables are named without
following java variable naming convention rules. Under which
category this issue can be tracked in the tool? Choose the most
appropriate option.
Minor
57. Sam has created a TestNG project with below specified TestClass.
public class TestClass
{
@Test(priority=1)
public void method1() {….}
@Test
public void method3() {….}
@Test
public void method2() {….}
@Test(priority=2)
public void method4() {….}
}
Predict the test method execution sequence. Choose the most
appropriate option.
method2, method3, method1, method4
58. What method in the Web driver library is used to get the attribute
value of a web element? Choose the appropriate option.
getAttribute(“attributeName”)
59. Sean is coding to automate mouse interactions on a web browser.
Assist Sean to identify the mouse event specific methods from the
below options. Choose the appropriate options.
moveToElement()
moveByOffset()
release()
60. Samantha has designed a TestClass with the following methods:
public class TestClass
{
@BeforeMethod
public void method1() {……}
@AfterMethod
public void method2() {……}
@Test(dataProvider=”loginData”)
public void method3(String u, String p) {…..}
@DataProvider
public Object[][] loginData() {….}
}
Suppose loginData() generates 5 sets of login credentials, how many
times method1, method2 and method 3 would be executed ? Choose
the appropriate option.
Method1 – 5 times, Method2 – 5 times, Method3 – 5 times
61. Identify the correct flow of Jenkins build, when a maven project
job in Jenkins is triggered for build.
pom.xml >testing.xml- >testing classes>reports
62.Sarah has her code in git local repository, but her team lead had
pushed the new changes into the remote repository, which git
command would you recommend Sarah with new changes into her
working copy?
add
63. Mary is struggling to find a suitable simple wild cart character
that matches any single character. Please suggest to her which of
the following characters many be relevant to her search
(?) - single character search (*) - one or more
64. Sean configured his project for the test suite execution using
TestNG. He wants to perform parallel execution of the test cases.
Which attribute represents the parallel execution of the test cases?
parallel="tests"
65. Kevin is designing an automation test, where test data is specified
in an external excel file. Which command will be helpful to write
the data into a cell of the excel file? Assume c1 is the cell object.
c1.setCellValue("data")
66. Which of the following Java classes are from the Extent API
library?
ExtentReports
Status
67. Which date format is used to customize the system data to year-
month-day format?
new SimpleDateFormat(“yyyy-MM-dd”)
68. Fuller has written an automation script using selenium webdriver
commands. He has used all the necessary and appropriate locators
for interacting with the web elements. When he executed the script
the web driver was not able to locate an element resulting in the test
script failure. Which error/ exception is thrown by webdriver?
NoSuchElementException
69. What are the various status options available in the Extent reports
library?
PASS,FAIL,SKIP,FATAL,ERROR,WARNING,INFO
70. Kevin wants to fetch all the data from the country drop down
menu and verify the data against data from the database. He is
looking into the library for a method to fetch all the data from the
country drop down box. Which method will help Kevin?
getOptions()
71. Samantha has to execute automation scripts across multiple
platforms like windows, mac, Linux which tool in the selenium suite
will be used by Samantha? Choose the most appropriate option.
selenium RC
72. The web element looks like
<a href=”icart.jsp? params”>cart[19]</a>.
Which locator is most recommended for the scan to identify the
cart web element for all test iterations ?
By.partialLinkText()
73. Kevin is planning to write automation script for below scenario.
Given the user is on the payment page. He views a textbox with
attribute values . “Enter Mobile Number” written in the box. The
user must enter the mobile number in the box to proceed. Please
choose the correct command to help Kevin in automating the
scenario. Assume the textbox element is already identified and
stored in mobile txt box variable.
mobileTxtBox.clear(); mobileTxtBox.sendKeys(“xxxxxxxxxx”);
74. Which MS office component(s) can be handled by Apache POI
Library?
XLSX
75. Sarah is coding to automate a scenario for the selection of the
“from Cities” drop down box IN the flight booking application web
page, which WebDriver library class helps Sarah to automate the
drop-down box with different functions?
Select Class
76. Sean is performing verification using assert class functions from
TestNG. Suggest him the correct method to verify the
reference/address of the two objects to be identical?
assertSame(object1,object2)
77. Samantha has to execute automation scripts across multiple
platforms like windows, max and Linux. Which tool in the
Selenium suite will be useful for Samantha?
Selenium Grid
78. Sean wants to switch to multiple frames on a web page when an
operation is completed on a frame and test flow needs to move to
another frame. Calling the driver.switchTo().frame() immediately
will not move the context to next frame, which is at the same level
in DOM. The test will first need to switch to the main document
and then activate the frame. Which method is used to switch back
to the main document from the frame?
switchTo.defaultContent()
79. Samantha is automating a test scenario. This scenario involves a
pop-up of confirmation window. She wants to interact with the pop-
up window and decline the confirmation. Pop-up window shows a
message “Do you want to cancel the payment?”
Driver.switchTo().alert().dismiss()
80. Sarah is coding an automation script, where she has to validate the
price of the holiday package based on the drag & drop of island city
from the menu. The price is fetched from the server and displays
without reloading the web page. Which WebDriver library class
has the predefined conditions for handling dynamic waits in
selenium WebDriver Library?
WebDriverWait
81. While using Soft Assertion in the Test Class, James must specify a
method, that will collate and display the assertion results.
assertAll()
82. Which java interface is used to capture screenshot of web page
using Web Driver API?
TakesScreenshot
83. Consider the below HTML code snippet.
Email ; <label id= “Email” class= “style1” name= “input”>
Which is the best locator to identify the email web element?
By.xpath(“//label[@id= ‘email’]”)
1. Sarah is coding in a test scenario, in which she must fetch the
booking id as a text message from the span element.
The web element looks like
<Space> order completed with Booking id:6665<Space>
Help Sarah to find a method from the webdriver library to fetch the
booking ID?
Ans - getText();
2. James is automating a script and using CSS Selector as a locator.
What are the primitive types for designing the CSS selector? ANS -
.id, .Attribute, .innerText()
(Explanation - There are 5 types of CSS Selectors in Selenium tests
ID, Class, Attribute, Sub-String, Inner Text)
3. Which expression is used in CSS Selectors to match the attribute
value with a prefix?
ANS- ^=
(Explanation - [attr^=value] Represents elements with an attribute
name of attr whose value is prefixed (preceded) by value.)
4. Write in correct order.
a. Triggers the build
b. Open reports to see the latest test results.
c. Jenkins checks the Git Repository periodically to detect changes in
build project.
d. The build is successful / Failure.
e. Testers/ Developers commits source code changes to the shared Git
Repository.
ANS- e,c,a,d,b
5. Kevin has designed a TestClass with the following methods:
public class TestClass {
@Test
public void testMehod1() {int a = 78;}
@Test
public void testMehod2() {Assert.assertEquals(67, 76);}
public void testMehod3() {System.out.println("Welcome");}
@Test
public void testMehod4(){Assert.assertEquals("Hello”,
“Hello");} }
Kevin executes the above TestClass as a TestNG test. Which of the
following correctly represents the test result?
ANS - Total tests run: 3, Passed: 2, Failed: 1
6. Identify the correct way of launching the Chrome browser through
WebDriver instance with the correct property.
ANS -
System.setProperty("webdriver.chrome.driver","src/test/resources
/chromedriver.exe");
WebDriver driver = new ChromeDriver();
7. Samantha wants to write an automation script that determines the
count of Hobbies checkboxes. These checkboxes have a name
attribute as “hobbies”. Assist Samantha by choosing the correct
command.
ANS –
driver.findElements(By.name(“hobbies”)).size()
8. Henry is designing a script and using CSS Selector as the locator
strategy. He must locate the element effectively. The element
inspected looks like:
<input id=“newPassword” type=“password”>
ANS - By.cssSelector("input[id='newPassword']")
By.cssSelector("input[id$='Password']")
9. Kevin is automating a test scenario. In which he wants to locate an
element with the class attribute “classg1 jkyu_90”. Assist Kevin in
setting up the correct locator for the element.
ANS - By.className(“classg1”)
10. Select the correct order of execution of annotations, as per the life
cycle of the TestNG which can be applied for test methods along
with beforeXXXX – afterXXXX methods.
ANS - @BeforeTest, @BeforeClass, @BeforeMethod, @Test,
@AfterMethod, @AfterClass, @AfterTest
11. Sean is coding an automation script for emulating user actions by
mouse actions using webdriver library. Assist Sean to choose the
correct syntax to create an object for Actions class from the
following options.
ANS -
Actions act = new Actions(driverinstance)
Actions act = new Actions()
Actions act = (Actions)driverinstance
12. Kevin is using a CSS Selector as a locator strategy for the following
element:
<h1 id=“msg01” name=“success”>Registration
completed</h1> He must identify the element effectively.
ANS –
By.cssSelector(“h1[id=‘msg01’]”)
By.cssSelector(“h1[id=‘msg01’][name=‘success’]”)
13. Which of the following method causes a thread to pause for a
specified duration?
pause()
14. What are the features of TestNG?
Annotation Based
Parallel Testing
Reporting
15. __ Closes all the associated windows of webdriver.
Quit()
16. Which of the following components identify the artifacts in
Maven?
Artifact Id
Group ID
Version
17. What is the correct Syntax to instantiate a Firefox Browser
session?
WebDriver driver = new FirefoxDriver();
18. Consider there are three frames in a web page, which method
below is used to comeback to main window before switching to any
frame?
switchTo.defaultContent()
19. Which of the following methods will be used to handle an alert
dialog box?
alert.accept()
20. Which of the given options are structure-based
locators? CSS
XPATH
21. Which of the following command should be used to extract more
than one element on web page?
findElements
22. Which of the following is a term used in thee testing of computer
software to describe testing done using a table of conditions directly
as test data inputs?
Data Driven Testing
23. getText() method extracts the text from an element.
True
24. Sean is coding to automate a web application using the webDriver
library. He had set the implicit wait of 30 seconds. However, the
webelement was found within 10s. Will the webdriver wait for
further 20 seconds before executing the next line of code? YES ,
webDriver will wait 20 more seconds.
25. Sarah wants to automate the selection of only one option from a
drop-down box as shown below.
<html>
<body>
<select multiple>
<option value = “web”> html</option>
<option value = “prog”> python</option>
<option value = “prog”> java</option>
<option value = “prog”> python</option>
<option value = “prog”> java</option>
</select>
</body>
</html>
Sarah has to select only the fourth option i.e., python from the
option list .
selectByIndex()
26. Sean is automating a test scenario in which he has to fetch the URL
of the webpage using webDriver API. Suggest a method for Sean to
get the link address.
getCurrentURL()
27. Which method is used in the Apache POI library to fetch the cell
value from a row? Identify the correct format of invoking the
library functions to get the value from the cell.
sheet.getRow(rowno).getcell(col no).getStringCellValue()
28. Match the following tools with the correct description.
Tools Description
A. GIT 1. A cloud service for remote hosting of
git repositories. In addition to hosting
your code, the site helps manage
software
development projects.
B. Git Lab 2. Open-Source platform or
continuous inspection of code
quality to perform
automatic review with static analysis
of code to detect bugs.
C. SonarQube 3. Software that handles source code
versioning, letting you make and track
local file changes and share with
remote repository.
A-3, B-1, C-2
29. Sarah is coding an automation script to switch to IFRAME in a
web application .Which of the listed options(s) will help Sarah to
switch to a particular frame on a web page using the webdriver
library?
driver.switchTo().frame(int index)
driver.switchTo().frame(string nameOrld)
driver.switchTo().frame(WebElement frameElement)
30. Sean is coding an automated script to launch the web application
on a browser window. Which of the following listed option will help
Sean to launch the desired application on a web browser in
selenium?
driver.get(“URL”)
driver.navigate().to(“URL”)
31. Which of the following is correct about generating XML suite file
in TestNG for Test Suite Execution?
TestNG XML Suite file can be generated at the time of creating a
TestNG class.
TestNG XML Suite file can be generated using ‘convert
to TestNG’ option in Eclipse after a java class is created.
32. Sam is designing an automation test, where test data is specified in
an external excel file. Which command will be helpful to get across
to the 2nd sheet of excel file? Assume wb is the workbook object.
wb.getSheetAt(1)
33. Sarah is coding to automate script to switch to multiple windows in
a web application. She has to store all the window instances in a java
variable which is retrieved by driver.getWindowHandles().
Suggest Sarah with a compatible return type to store the window
references.
set <string>
34. When verification fails in TestNG, what forces the test to stop
execution and mark as Fail?
AssertionError
35. Samantha wants to automate selection of value from a drop-down
menu. When the element was Inspected. She found:
<html>
<body>
<select name=”jobrole”>
<Option value=”1”>Manager</option >
<option value=”2”>Lead</option>
<option value=”3”>Analyst</option>
</select>
</body>
<html>
Choose “lead” as the test data. Assist her by choosing the correct
options.
selectByIndex(1);
selectByVisibleText(“Lead”)
selectByValue(“2”)
36. In distributed version control system for SCM, which of the
following is not true?
Only online commits are allowed.
37. Which plugin can be used as an IDE(like Eclipse) extension that
helps to detect and fix quality issues of code written in
java/python/html/JavaScript/php?
Sonar Lint
38. Sarah is an Automation Engineer and wants to build a job from
Jenkins server. The Jenkins server is up and running. What is the
default port number that Sarah needs to remember to access the
Jenkins server with URL?
8080
39. Which of the following are supporting attributes for @Test?
priority
enabled
40. Identify the wait time method which is not the Selenium way to
handle synchronization in Test Automation.
Sleep()
41. Which of the following library is used for designing the test
scripts using the predefined classes, methods, and annotations?
TestNG Library
42. Sean is working on a Test Automation project; He is looking for
different strategies for identifying the elements/objects from the
web application using Selenium locators. Suggest Sean with the
available locators in Selenium.
By.id()
By.tagName()
By.partialLinkText()
(Explanation – SELENIUM Selectors - ID, Tag Name, Link Text,
Name, CSS Selector, Partial Link Text, Class Name, XPath)
43. Which of the following is used to pass data from a source to a
particular test method to replace the constant values with variables
in TestNG?
Data Provider
44. In the TestNG framework, which of the following contains
Single/Multiple Test Cases?
Test Suite
45. List out the operating systems that are supported by
Selenium. Windows, Linux, Mac, android & iOS
46. Sean is filling a web form with his contact details like email, phone
number, and address while performing registration to an event. He
clicked on submit button without entering the phone number and a
pop-up window appeared saying "Contact Number is required".
Identify the correct way to handle such pop-up windows using
Selenium WebDriver.
driver.switchTo().alert()
47. Identify the child tags that are required to add inside dependency
tag in order to download the desired libraries/jar from the maven
central repository without any errors.
groupId
version
artifactId
48. Sarah is coding an automation script to switch to frame in a web
application. Help her to switch a particular frame on a web page
using the window library. She wants to interact with the pop-up
window and decline the confirmation pop up window show a
message “Do you want to cancel the payment?”. Assist Samantha to
interact with
Driver.SwitchTo().frame(int index)
Driver.SwitchTo().frame(String name or id)
Driver.switchto().frame(webelement frameelement)
49. Testing an automation script to test a web application. He has to
store the Logout link in the using a driver.findElement() method.
Suggest Sean with a compatible return to leg out least object.
WebElement
50. James wants to automate the selection of ID proofs drop-down box
in the web application. He has to verify the drop-down has a
selection of more than one option. Which of the following method is
suggested to James?
isMultiple()
51. Kevin wants to generate extensive report for the test automation
project. He decides to use Extent reports library. Which class in
this library is used to create labels, code blocks and labels in the
report?
Markup Helper
52. Sarah is coding an automation script to switch to multiple windows
in a web application . She has to store all the window instance in a
java variable which is returned by driver.getWindowHandles().
Suggest Sarah with a compatible return type to store the window
References.
Set<String>
53. Sarah is coding an automation Script to locate a child element in
an unordered list. The list is given below:
<html>
<body>
<ul class=”cities”>
<li>Bangalore</li>
<li>Chennai</li>
<li>Hyderabad</li>
<li>Mumbai</li>
<li>Pune</li>
</ul>
</body>
</html>
Sarah wants to locate the 3rd child element i.e., Hyderabad.
Suggest the appropriate locator strategy for Sarah.
CSS = "ul.cities li:nth-of-type("Hyderabad")
54. Which java Enum is used to handle the keyboard strokes from web
driver library? Choose the most appropriate option.
Keys
55. There is an element on the web page when inspected on the
browser it looks like <div class=”errorMsg”>Error Message</div>
James wants to use selenium locators to identify the element.
Choose the correct set of commands to locate the element
effectively.
By.cssSelector(“div.errorMsg”)
56. George is reviewing the quality of the Java code given to him using
SonarQube and identified that the variables are named without
following java variable naming convention rules. Under which
category this issue can be tracked in the tool? Choose the most
appropriate option.
Minor
57. Sam has created a TestNG project with below specified TestClass.
public class TestClass
{
@Test(priority=1)
public void method1() {….}
@Test
public void method3() {….}
@Test
public void method2() {….}
@Test(priority=2)
public void method4() {….}
}
Predict the test method execution sequence. Choose the
most appropriate option.
method2, method3, method1, method4
58. What method in the Web driver library is used to get the attribute
value of a web element? Choose the appropriate option.
getAttribute(“attributeName”)
59. Sean is coding to automate mouse interactions on a web browser.
Assist Sean to identify the mouse event specific methods from the
below options. Choose the appropriate options.
moveToElement()
moveByOffset()
release()
60. Samantha has designed a TestClass with the following methods:
public class TestClass
{
@BeforeMethod
public void method1() {……}
@AfterMethod
public void method2() {……}
@Test(dataProvider=”loginData”)
public void method3(String u, String p) {…..}
@DataProvider
public Object[][] loginData() {….}
}
Suppose loginData() generates 5 sets of login credentials, how many
times method1, method2 and method 3 would be executed ? Choose
the appropriate option.
Method1 – 5 times, Method2 – 5 times, Method3 – 5 times
61. Identify the correct flow of Jenkins build, when a maven project
job in Jenkins is triggered for build.
pom.xml >testing.xml- >testing classes>reports
62.Sarah has her code in git local repository, but her team lead had
pushed the new changes into the remote repository, which git
command would you recommend Sarah with new changes into her
working copy?
add
63. Mary is struggling to find a suitable simple wild cart character
that matches any single character. Please suggest to her which of
the following characters many be relevant to her search (?) -
single character search (*) - one or more
64. Sean configured his project for the test suite execution using
TestNG. He wants to perform parallel execution of the test cases.
Which attribute represents the parallel execution of the test
cases? parallel="tests"
65. Kevin is designing an automation test, where test data is specified
in an external excel file. Which command will be helpful to write
the data into a cell of the excel file? Assume c1 is the cell object.
c1.setCellValue("data")
66. Which of the following Java classes are from the Extent API
library?
ExtentReports
Status
67. Which date format is used to customize the system data to year
month-day format?
new SimpleDateFormat(“yyyy-MM-dd”)
68. Fuller has written an automation script using selenium webdriver
commands. He has used all the necessary and appropriate locators
for interacting with the web elements. When he executed the script
the web driver was not able to locate an element resulting in the test
script failure. Which error/ exception is thrown by
webdriver? NoSuchElementException
69. What are the various status options available in the Extent reports
library?
PASS,FAIL,SKIP,FATAL,ERROR,WARNING,INFO
70. Kevin wants to fetch all the data from the country drop down
menu and verify the data against data from the database. He is
looking into the library for a method to fetch all the data from the
country drop down box. Which method will help Kevin?
getOptions()
71. Samantha has to execute automation scripts across multiple
platforms like windows, mac, Linux which tool in the selenium suite
will be used by Samantha? Choose the most appropriate option.
selenium RC
72. The web element looks like
<a href=”icart.jsp? params”>cart[19]</a>.
Which locator is most recommended for the scan to identify the
cart web element for all test iterations ?
By.partialLinkText()
73. Kevin is planning to write automation script for below scenario.
Given the user is on the payment page. He views a textbox with
attribute values . “Enter Mobile Number” written in the box. The
user must enter the mobile number in the box to proceed. Please
choose the correct command to help Kevin in automating the
scenario. Assume the textbox element is already identified and
stored in mobile txt box variable.
mobileTxtBox.clear(); mobileTxtBox.sendKeys(“xxxxxxxxxx”);
74. Which MS office component(s) can be handled by Apache POI
Library?
XLSX
75. Sarah is coding to automate a scenario for the selection of the
“from Cities” drop down box IN the flight booking application web
page, which WebDriver library class helps Sarah to automate the
drop-down box with different functions?
Select Class
76. Sean is performing verification using assert class functions from
TestNG. Suggest him the correct method to verify the
reference/address of the two objects to be identical?
assertSame(object1,object2)
77. Samantha has to execute automation scripts across multiple
platforms like windows, max and Linux. Which tool in the
Selenium suite will be useful for Samantha?
Selenium Grid
78. Sean wants to switch to multiple frames on a web page when an
operation is completed on a frame and test flow needs to move to
another frame. Calling the driver.switchTo().frame() immediately
will not move the context to next frame, which is at the same level
in DOM. The test will first need to switch to the main document
and then activate the frame. Which method is used to switch back
to the main document from the frame?
switchTo.defaultContent()
79. Samantha is automating a test scenario. This scenario involves a
pop-up of confirmation window. She wants to interact with the pop
up window and decline the confirmation. Pop-up window shows a
message “Do you want to cancel the payment?”
Driver.switchTo().alert().dismiss()
80. Sarah is coding an automation script, where she has to validate the
price of the holiday package based on the drag & drop of island city
from the menu. The price is fetched from the server and displays
without reloading the web page. Which WebDriver library class
has the predefined conditions for handling dynamic waits in
selenium WebDriver Library?
WebDriverWait
81. While using Soft Assertion in the Test Class, James must specify a
method, that will collate and display the assertion results.
assertAll()
82. Which java interface is used to capture screenshot of web page
using Web Driver API?
TakesScreenshot
83. Consider the below HTML code snippet.
Email ; <label id= “Email” class= “style1” name= “input”>
Which is the best locator to identify the email web element?
By.xpath(“//label[@id= ‘email’]”)
SELENIUM
1. Sean is coding to automate a web application using the webDriver library. He had set the implicit
wait of 30 seconds. However, the webelement was found within 10s. Will the webdriver wait for
further 20 seconds before executing the next line of code?
Ans: No, webDriver won’t wait 20 more seconds.
2. Which method is used in the Apache POI library to fetch the cell value from a row? Identify the
correct format of invoking the library functions to get the value from the cell
Ans: sheet.getRow(rowno).getcell(col no).getStringCellValue()
3. Sarah is coding to automate script to switch to multiple windows in a web application. She has to
store all the window instances in a java variable which is retrived by driver.getWindowHandles().
Suggest sarah with a compatable return type to store the window references.
Ans:Set <string>
4. sarah has her code in git local repository, but her team lead had pushed the new changes into the
remote repository, Which git command would you recommend Sarah with new changes into her
working copy?
Ans: add
5. Sean is automating a test scenario in which he has to fetch the URL of the webpage using
webDriver API. Suggest a method fo Sean to get the link address
Ans: getCurrentURL()
6. Mary is struggling to find a suitable simple wild cart character that matches any single character.
Please suggest to her which of the following characters many be relevant to her search
Ans: (?) – single character search (*) – one or more
1) Which of the following is correct about generating XML suite file in testNG for Test Suite
Execution
a TestNG XML Suite file can be generated at the time of creating a TestNG class. b TestNG XML
Suite file can be generated using ‘convert to TestNG’ option in Eclipse after a java class is
created.
c TestNG XML Suite file can be automatically generated when user creates a maven java project
d There is no option in Eclipse to generate XML Suite file
e TestNG XML Suite file can be generated by Jenkins plugin
2) Sean is coding an automated script to launch the web application on a browser window. Which of
the following listed option will help Sean to launch the desired application on a web browser in
selenium?
a driver.get(“url”)
b driver.navigate().to(“URL”)
c driver.navigate(“URL”)
d driver.getUrl(“URL”)
e driver.setUrl(“URL”)
3) Sam is designing an automation test, where test data is specified in an external excel file. Which
command will be helpful to get across to the 2nd
sheet of excel file. Assume wb is the workbook
object.
a wb.getSheetAt(1)
b wb.getSheetAt(2)
c wb.getSheet(1)
d wb.getSheet(2)
4)Sean configured his project for the test suite execution using TestNG. He wants to perform parallel
execution of the test cases. Which attribute represents the parallel execution of the test cases?
a parallel = “methods”
b parallel="tests"
c parallel = “test-classes”
d parallel =”test-cases”
5) Kevin is designing an automation test, where test data is specified in an external excel file. Which
command will be helpful to write the data into a cell of the excel file? Assume c1 is the cell object.
a c1.setCellValue("data")
b c1.setValue(“data”)
c c1.writeCellValue(“data”)
d c1.setCellData(“data”)
6) Sarah wants to automate the selection of only one option from a drop-down box as shown
below.
<html>
<body>
<select multiple>
<option value = “web”> html</option>
<option value = “prog”> python</option>
<option value = “prog”> java</option>
<option value = “prog”> python</option>
<option value = “prog”> java</option>
</select>
</body>
</html>
Sarah has to select only the fourth option i.e. python from the option list .
a selectByVisibleText()
b selectByValue()
c selectByIndex()
d All of the above
DDT
Sam is designing an automation test, where test data is specified in an external excel file. Which
command will be helpful to get access to the 2nd
sheet of the excel file. Assume wb Is the workbook
object
wb.getSheetAt(1)
wb.getSheetAt(2)
wb.getSheet(1)
wb.getSheet(1)
EXTENT REPORTS
Which of the following Java classes are from the Extent API library?
ExtentReports
Status
TakesScreenshot
Actions
SWITCHING TO WINDOWS
Which of the following methods is used to close all the opened windows of WebDriver
Instance? Close()
Quit()
Null()
Sleep()
ACTIONS
Sean is coding an automation script for emulating user actions by mouse using the webdriver library.
Assist Sean to choose correct syntax to create an object for actions class from the following options
Actions act = new Actions(driverInstance)
Actions act = new Actions()
New Actions(driverInstance)
Actions act = (Actions)driverInstance
Actions.callMethods()
EXTENT REPORTS
Which date format is used to customize the system data to year-month-day format?
new SimpleDateFormat(“yyyy-mm-dd”)
new SimpleDateFormat(“yyyy-MM-dd”)
new SimpleDateFormat(“yyyy-month-dd”)
new SimpleDateFormat(“yyyy-mmm-dd”)
WEBDRIVER API
Fuller has written an automation script using selenium webdriver commands. He has used all the
necessary and appropriate locators for interacting with the web elements. When he executed the
script the web driver was not able to locate an element resulting in the test script failure. Which
error/ exception is thrown by webdriver?
NoSuchElementException
NoSuchElementError
NullPointerException
ObjectNotFoundException
Cannot predict the name of error/ exception
WEBDRIVER API
Samantha wants to automate selection of value from a drop down menu. When the element was
Inspected. She foundAgain
<html>
<body>
<select name=”jobrole”>
<Option value=”1”>Manager</option >
<option value=”2”>Lead</option>
<option value=”3”>Analyst</option>
</select>
</body>
<html>
Choose “lead” as the test data. Assist her by choosing the correct
options. selectByIndex(1)
selectByValue(2)
selectByVisibleText(“Lead”)
selectByValue(“2”)
Q1- Which expression is used in CSS selectors to match the attribute value with a prefix?
Ans: ^
Q2- public class TestClass
{
@Test(priority=1)
public void method1(){...}
@Test
public void method3(){...}
@Test
public void method2(){...}
@Test(priority=2)
public void method4(){...}
}
Ans: method2,method3,method1,method4
1. Which java enum is used to handle the keyboard strokes from webdriver library?
a. Actions
b. Keyboard
c. Keys
d. Keyword
2. Sam is designing an automation test, where test data is specified in an external excelfile.
Which command will be helpful to get access to the 2nd
sheet of the excel file. Assume wb is
workbook object.
a. wb.getSheetAt(1)
b. wb.getSheetAt(2)
c. wb.getSheet(1)
d. wb.getSheet(2)
3. sarah wants to automate the selection of only one option from a drop down box as shown
below
<html>
<body>
<select multiple>
<option value=”web”>html</option>
<option value=”prog”>python</option>
<option value=”prog”>java</option>
<option value=”prog”>python</option>
<option value=”prog”>java</option>
</select>
</body>
</html>
Sarah has to select only the fourth option that is python from the options list
a. selectByVisibleText()
b. selectByValue ()
c. selectByIndex()
d. all the above
4. What are the various status options available in the Extent reports library?
a. PASS,FAIL,SKIP,FATAL,ERROR,WARNING,INFO
b. SUCCESS,FAIL,SKIP ,ERROR,WARNING,INFO
c. DONE,DEBUG,FAIL,SKIP,ERROR,WARNING,INFO
d. ABORT,PASS,FAIL,DONE,ERROR,WARNING,INFO
5. Sean is automating a test scenario, in which he has to fetch the URL of the web page using
WebDriver API . Suggest a method for Sean to get the link address.
a. getURL()
b. get()
c. getCurrentURL()
d. getURL()
6. Kevin wants to fetch all the data from the country drop down menu and verify the data
against data from the database. He is looking into the library for a method to fetch all the
data from the country drop down box. Which method will help Kevin?
a. selectAllOptions()
b. getOptions()
c. getAllOptions()
d. getData()
e. getText()
7. QUESTION NOT VISIBLE , multiple options
a. driver.get(“URL”)
b. driver.navigate().to(“URL”)
c. driver.navigate(“URL”)
d. driver.getUrl(“URL”)
e. driver.setUrl(“URL”)
f. Sarah is coding in a test scenario, in which she must fetch the booking id as a text
message from the span element.
The web element looks like
<Space> order completed with Booking id:6665<Space>
Help Sarah to find a method from the webdriver library to fetch the booking ID?
Ans - getText();
g. James is automating a script and using CSS Selector as a locator. What are the
primitive types for designing the CSS selector?
ANS - .id, .Attribute, .innerText()
(Explanation - There are 5 types of CSS Selectors in Selenium tests
ID, Class, Attribute, Sub-String, Inner Text)
h. Which expression is used in CSS Selectors to match the attribute value with a prefix?
ANS- ^=
(Explanation - [attr^=value] Represents elements with an attribute name of attr whose
value is prefixed (preceded) by value.)
i. Write in correct order.
a. Triggers the build
b. Open reports to see the latest test results.
c. Jenkins checks the Git Repository periodically to detect changes in build
project. d. The build is successful / Failure.
e. Testers/ Developers commits source code changes to the shared Git Repository.
ANS- e,c,a,b,d
j. Kevin has designed a TestClass with the following methods:
public class TestClass {
@Test
public void testMehod1() {int a = 78;}
@Test
public void testMehod2() {Assert.assertEquals(67, 76);}
public void testMehod3() {System.out.println("Welcome");}
@Test
public void testMehod4(){Assert.assertEquals("Hello”, “Hello");}
}
Kevin executes the above TestClass as a TestNG test. Which of the following correctly
represents the test result?
ANS - Total tests run: 3, Passed: 2, Failed: 1
k. Identify the correct way of launching the Chrome browser through WebDriver instance
with the correct property.
ANS -
System.setProperty("webdriver.chrome.driver","src/test/resources/chromedriver.exe
");
WebDriver driver = new ChromeDriver();
l. Samantha wants to write an automation script that determines the count of Hobbies
checkboxes. These checkboxes have a name attribute as “hobbies”. Assist Samantha
by choosing the correct command.
ANS –
driver.findElements(By.name(“hobbies”)).size()
m. Henry is designing a script and using CSS Selector as the locator strategy. He must
locate the element effectively. The element inspected looks like:
<input id=“newPassword” type=“password”>
ANS - By.cssSelector("input[id='newPassword']")
n. Kevin is automating a test scenario. In which he wants to locate an element with the
class attribute “classg1 jkyu_90”. Assist Kevin in setting up the correct locator for the
element.
ANS - By.className(“classg1”)
o. Select the correct order of execution of annotations, as per the life cycle of the TestNG
which can be applied for test methods along with beforeXXXX – afterXXXX methods. ANS -
@BeforeTest, @BeforeClass, @BeforeMethod, @Test, @AfterMethod, @AfterClass, @AfterTest
p. Sean is coding an automation script for emulating user actions by mouse actions using
webdriver library. Assist Sean to choose the correct syntax to create an object for
Actions class from the following options.
ANS -
Actions act = new Actions(driverinstance)
Actions act = new Actions()
Actions act = (Actions)driverinstance
q. Kevin is using a CSS Selector as a locator strategy for the following element:
<h1 id=“msg01” name=“success”>Registration completed</h1>
He must identify the element effectively.
ANS –
By.cssSelector(“h1[id=‘msg01’]”)
By.cssSelector(“h1[id=‘msg01’][name=‘success’]”)
89. Which of the following reports can be generated using plugins from Cucumber
options? ANS- All of the above Correct
90. James wants to design a scenario in a feature file, in which the complete scenario runs multiple
times for different data sets . Suggest James with a Gherkin keyword to activate drop-down testing
in the feature file ?
ANS- Use Scenario outline. Correct
91. Jack had created the feature file with the below mentioned scenarios as shown below:
@smoke Scenario: This is the first scenario
@crash Scenario: This is the second scenario In test runner class, Jack mentioned
@cucumberoptions (tags=(“smoke”)) predict which scenario is/are gets executed
Ans: Execute first scenario Correct
92.Which of the following is the logical container that contains all the elements which drive the
performance test?
Ans: Load Testing Correct But, If Test Plan Available in option, Then, the correct Ans will be Test
Plan.
93. Which of the following assertions is not applied in Jmeter?
Ans: web Correct
94. Which of the following is an invalid configuration element in Jmeter?
Ans: FTP cookie manager Correct
95. Which of the following input documents is used to create test scenarios and conditions?
Ans: Use cases Correct
96. Which of the following Java classes are from the extent API library?
Ans: ExtentReports, Status Correct Google: ExtentReports
97. Sean is coding to automate a web application using the webDriver library. He had set the implicit
wait of 30 seconds. However, the webelement was found / Test Plan correct correct correct Google :
ExtentReports correct within 10s . Will the webdriver wait for further 20 seconds before executing
the next line of code?
Ans: Yes, webDriver will wait 20 more seconds. Correct
1) Which java enum is used to handle the keyboard strokes from webdriver library?
(a) Actions
(b) Keyboard
(c) Keys
(d) Keyword
Ans: (b) keyboard
2) Which expression is used in CSS selectors to match attribute value with a prefix?
(a)$=
(b)^=
(c)*=
(d)none
Ans: (b) ^=
3) Samantha wants to automate selection of valur from a drop…..
<html>
<body>
<select name=”jobrole”>
<option value=”1”>Manager</option>
<option value=”2”>Lead</option>
<option value=”3”>Analyst</option>
</select>
</body>
</html>
Ans: SelectByVisibleText(“Lead”)
SelectByValue(“2)
4) Sarah is coding an automation script to switch to IFRAME in a web application .Which of the
listed options(s) will help sarah to switch to a particular frame on a web page using the
webdriver library?
(a )driver.switchTo().frame(int index)
(b) driver.switchTo().frame(string nameOrld)
( c) driver.switchTo().frame(WebElement frameElement)
(d)driver.switchTo().frame()
(e) driver.switchTo().frame(String name)
ANS: (a) , (b), (c)
5)Which Ms office components(s) can be handled by apache POI library?
(a)ppt
(b)docs
(c)…
(d)…
(e)all the above
Ans: POIFS
6)Samanta has designed a testclass, with the….
Public class testclass
{
@beforeMethod
Public void method1() {…}
@afterMethod
Public void method2() {…}
@Test(dataProvider=”loginData”)
Public void method2(string u, string p) {…}
@data provider
Public object[][] login data() {…}
Suppose login data () generates 5 sets og login credentials …..
Choose right answer.
ANS: Method1 – 5 times…….
****7) which method is used in apache poi library to fetch the cell value from a row? identify the
format of invoking the library functions to get value from a cell
(a)sheet.getStringCellValue()
(b) sheet.get(rowno).getstringCellvalue()
(c) sheet.getCell(collno) .getstringCellvalue()
(d) sheet.get(rowno).getCell(colon).getstringCellvalue()
Ans : (c)
1. Samantha has to execute automation scripts across multiple platforms like windows, mac,
Linux which tool in the selenium suite will be used by Samantha?
Choose the most appropriate option.
Ans selenium RC
2. George is reviewing the quality of the java code given to him using SonarQube and
described that the variables are named without following java variables naming
convention. Under which category this issue can be tracked in the tool?
Choose the most appropriate option.
Ans minor
3. Identify the correct flow of jenkins build, when a maven project job in Jenkins is triggered
for build
Ans testing.xml->pom.xml>testing classes>reports
4. Sarah is coding to automate a scenario for the selection of the “from Cities” drop down
box on the flight booking application web page, which class is used?
Ans Select Class
5. Sarah is coding in a test scenario, in which she must fetch the booking id as a text message
from the span element The web element looks like <Space> order completed with Booking
id:6665<Space> Help Sarah to find a method from the webdriver library to fetch the
booking ID?
Ans get Text();
6. Which expression is used in CSS Selectors to match the attribute value with a prefix?
Ans ^=
1. Samantha has designed a TestClass with the following methods:
public class TestClass
{
@BeforeMethod
public void method1() {……}
@AfterMethod
public void method2() {……}
@Test(dataProvider=”loginData”)
public void method3(String u, String p) {…..}
@DataProvider
public Object[][] loginData() {….}
}
Suppose loginData() generates 5 sets of login credentials, how many times method1, method2 and
method 3 would be executed ?
Choose the appropriate option
a) Method1 – 5 times, Method2 – 5 times, Method3 – 5 times
b) Method1 – 1 time, Method2 – 1 time, Method3 – 5 times
c) Method1 – 1 time, Method2 – 1 time, Method3 – 1 time
d) Cannot predict the iterations
2. Sarah is coding an automation script to switch to iFRAME in a web application. Which of the listed
options will help Sarah to switch to a particular frame on a web page using the webdriver library?
Choose the appropriate options.
a) driver.switchTo().frame(int index)
b) driver.switchTo().frame(String name Or id)
c) driver.switchTo().frame(WebElement frameElement)
d) driver.switchTo().frame()
e) driver.switchTo().iframe(String name)
3. Sean is coding to automate mouse interactions on a web browser. Assist Sean to identify the mouse
event specific methods from the below options.
Choose the appropriate options.
a) moveToElement()
b) moveByOffset()
c) release()
d) keyUp()
e) keyDown()
f) sendKeys()
4. What method in the Web driver library is used to get the attribute value of a web element?
Choose the appropriate option.
a) getAttributeValue(“attributeName”)
b) getAttribute(“attributeName”)
c) getValue(“attributeName”)
d) getText()
5. Sam has created a TestNG project with below specified TestClass.
public class TestClass
{
@Test(priority=1)
public void method1() {….}
@Test
public void method3() {….}
@Test
public void method2() {….}
@Test(priority=2)
public void method4() {….}
}
Predict the test method execution sequence.
Choose the most appropriate option.
a) method2, method3, method1, method4
b) method1, method4, method3, method2
c) method1, method4, method2, method3
d) Random order of execution
6. Sarah is coding to automate a test scenario in which she must fetch the booking id as a text
message from the span element.
The web element looks like: <span>Order Completed With Booking
ID:6665</span> Help Sarah to find a method from the WebDriver Library to fetch
the Booking ID.
Choose the most appropriate option.
a) getValue()
b) getID()
c) getText()
d) getTagName()
7. George is reviewing the quality of the Java code given to him using SonarQube and identified that
the variables are named without following java variable naming convention rules. Under which
category this issue can be tracked in the tool?
Choose the most appropriate option.
a) Info
b) Minor
c) Major
d) Critical
e) Sarah as an automation engineer triggers a new build from Jenkins as a maven project
having source codes in git repository which of the following tools/ Software are required
to be configured by Sarah in Jenkins to make the build success.
Ans: jre , jdk ,meavon
f) Henry is designing a script and using css selector as the locator strategy. He must locate
the element effectively. The element inspected looks like
<input id =”new Password” type =”password”>
Choose the most appropriate option.
ans: By.CssSelector(“input[id=’password’]”)
g) There is an element on the web page when inspected on the browser it looks like
<div class=”errorMsg”>Error Message</div> James want to use selenium locators to
identify the element. Choose the correct set of commands to locate the element
effectively.
Ans: By.CssSelector(“div.errorMsg”)
h) Match the following tools with the correct description
ans: A-3 B-1 C-2
i) When verification fails in TestNG, what forces the test to stop execution and mark as
failed. Choose the most appropriate option.
Ans: Assertion Fail
j) Which java enum is used to handle the keyboard strokes from web driver library? Choose
the most appropriate option.
Ans: keys
1) Testing an automation script to test a web application. He has to store the Logout link in the
using a driver.findElement() method. Suggest Sean with a compatible return to leg out least
object.
(a) String
(b) WebDriver
(c) WebElement
(d) List
Ans: (c) WebElement
Sub-topic: TestNG
2) Which of the following is correct about generating about an XML suite file in TestNG for Test
Suite Exception.
(a) TestNG XML suite can be generated at time of creating TestNG class.
(b) TestNG XML suite can be generated using "Convert to testNG" option..........class is
created.
(c) TestNG XML suite file is automatically generated when user create a maven java project.
(d) There is no option in Eclipse to generate XML suite file.
(e) TestNG XML suite file can be generated by Jenkins
Ans: (a) TestNG XML suite can be generated at time of creating TestNG class.
(b) TestNG XML suite can be generated using "Convert to testNG" option..........class is
created.
Sub-topics: Switching to windows
3) Sarah is coding an automation script to switch to multiple windows in a web application .
She has to store all the window instance in a java variable which is returned by
driver.getWindowHandles(). Suggest Sarah with a compatible return type to store the
window
References.
(a) List<String>
(b) Set<String>
(c) Array<String>
(d) Window<String>
Ans: (b) Set<String>
Sub-topics: Extent Reports
4) Kevin wants to generate expensive report for the test automation project. He decides to use
Extent Report Library. Which class in the library is used to create labels, code blocks and
tables in the report?
(a). ExtentHtmlReporter.
(b). ExtentReports
(c). MarkupHelper
(d). ExtentTest.
Ans: ( c) MarkupHelper.
Sub-topics: WebDriver API
5) Sean is coding an automation Script to launch the web application on a browser window.
Which of the following listed option(s) will help Sean to lunch the desired application on a
web browser in selenium?
(a). driver.get(“URL”)
(b). driver.navigate().to(“URL”)
(c). driver.navigate(“URL”)
(d). driver.getUrl(“URL”)
(e). driver.setUrl(“URL”)
Ans: (a) driver.get("URL")
(b) driver.navigate().to("URL")
Sub-topics: WebDriver API
6) Sarah is coding an automation Script to locate a child element in an unordered list. The list is
given below:
<html>
<body>
<ul class=”cities”>
<li>Bangalore</li>
<li>Chennai</li>
<li>Hydrabad</li>
<li>Mumbai</li>
<li>Pune</li>
</ul>
</body>
</html>
Sarah wants to locate the 3rd
child element i.e Hydrabad. Suggest the appropriate locator stratgy
for
Sarah.
(a) CSS = “ul:cities li:nth-child(2)”
(b) CSS = “ul:cities li:nth-of-type(“Hydrabad”)
(c) CSS =” ul:cities li:nth-child(“Hydrabad”)
(d) CSS= “ul:cities li:nth-child(])”
Ans: (b) css="ul.cities li:nth-of-type("Hyderabad")
Sub-topic: WebDriver Api
7) James wants to automate the selection of ID proofs drop-down box in the web application.
He has to verify the drop-down has a selection of more than one option. Which of the
following method is suggested to James?
Ans : isMultiple()
8) Kavin is using CSS selector as a locator strategy for the following element: <h1 id”msg01”
name=”success” > Registeration Completed </h1>
Ans: By.cssSelector("h1[id='msg01']")
By.cssSelector("h1[id='msg01'][name='success']")
1) Which is an IDE extension that helps you detect and fix quality issues as you write code in
python/HTML/Javascript/PHP?
SonarQube
SonarLint
SonarQubeServer
None of the above
2) Sarah is coding an automation script to switch to iFRAME in a web application. Which of the
listed options will help sarah to switch to a particular frame on a web page using the library?
driver.switchTo().frame(int index)
driver.switchTo().frame(String nameOrld)
driver.switchTo().frame(Webelement frameElement)
driver.switchTo().frame()
driver.switchTo().iframe(String name)
3) Kevin is planning to write an automation script for below test scenario: Given the user is on
the Payment Page, he views a text box with attribute value=”Enter Mobile Number” written
inside the box. The user must enter the mobile number in the box.
Please check the correct command to help Kevin in automating this scenario. Assume that
text box element is already identified and stored in mobileTxtBox variable.
Choose the most appropriate option.
mobileTxtBox.clear(); mobileTxtBox.sendKeys(“9090909090”);
mobileTxtBox.sendKeys(“9090909090”);
mobileTxtBox.sendKeys(“9090909090”);mobileTxtBox.clear();
mobileTxtBox.value=”9090909090”;
4) Which Java enum is used to handle the keyboard strokes from WebDriver Library?
Actions
Keyboard
Keys
Keyword
1. Which java interface is used to capture screenshot of a web page using web driver API ?
Ans: TakeScreenshot
2. Henry is designing a script and using CSS Selector as the locator strategy. He must locate the
element effectively. The element inspected looks like:
<input id=“newPassword” type=“password”>
ANS : By.cssSelector("input[id='newPassword']")
3. Select the correct order of execution of annotations, as per the life cycle of the TestNG
which can be applied for test methods along with beforeXXXX – afterXXXX methods. ANS
:@BeforeTest, @BeforeClass, @BeforeMethod, @Test, @AfterMethod, @AfterClass,
@AfterTest
4. Kevin is using a CSS Selector as a locator strategy for the following element:
<h1 id=“msg01” name=“success”>Registration completed</h1>
He must identify the element effectively.
ANS :By.cssSelector(“h1[id=‘msg01’]”), By.cssSelector(“h1[id=‘msg01’][name=‘success’]”. 5.
Testing an automation script to test a web application. He has to store the Logout link in the
using a driver.findElement() method. Suggest Sean with a compatible return to leg out least
object.
Ans:WebElement
6. While using soft assertion in the test class, james must specify a method, that will collate
and display assertion results
Ans:assertAll()
7. Sarah is coding to automate a test scenario in which she must fetch the booking id as a text
message from the span element.
The web element looks like: <span>Order Completed With Booking
ID:6665</span> Help Sarah to find a method from the WebDriver Library to fetch
the Booking ID. Ans: getText()
8. Sean is coding to automate mouse interactions on a web browser. Assist Sean to identify the
mouse event specific methods from the below options.
Ans: moveToElement(),moveByOffset(),release()
9. Which date format is used to customize the system data to year-month-day format?
ANS:new SimpleDateFormat(“yyyy-MM-dd”)
10. What are the various status options available in the Extent reports library?
Ans:PASS,FAIL,SKIP,FATAL,ERROR,WARNING,INFO
11. James is automating a script and using CSS Selector as a locator. What are the primitive
types for designing the CSS selector?
ANS - .id, .Attribute, .innerText()
12. Sam has created a TestNG project with below specified TestClass.
public class TestClass {
@Test(priority=1)
public void method1() {….}
@Test
public void method3() {….}
@Test
public void method2() {….}
@Test(priority=2)
public void method4() {….}
}Predict the test method execution sequence.Choose the most appropriate
option.Ans:method2, method3, method1, method4.
Q:1 Sarah wants to automate the selection of only one option from a dropdown box as shown below
<html>
<body>
<select multiple>
<option value=”web”>html</option>
<option value=”prog”>python</option>
<option value=”prog”>java</option>
<option value=”prog”>python</option>
<option value=”prog”>java</option>
</select>
</body>
</html>.
Sarah has to select only the fourth option,i.e,python from the options field.
Ans: selectByVisibleText()
selectByValue()
selectByIndex()
All of the above
Q2: Sean is automating a test scenario, in which he has to fetch the URL of the web page using
WebDriver API. Suggest a method for Sean to get the link address
Choose the most appropriate option
Ans:-getURL()
get()
getCurrentURL()
getURI()
Q3: Sean configured his project for the test suite execution using TestNG. He wants to perform
parallel execution of the test cases. Which attribute represents the parallel execution of the test
cases?
a parallel = “methods”
b parallel="tests"
c parallel = “test-classes”
d parallel =”test-cases”
Q4: Fuller has written an automation script using selenium webdriver commands. He has used all the
necessary and appropriate locators for interacting with the web elements. When he executed the
script the web driver was not able to locate an element resulting in the test script failure. Which
error/ exception is thrown by webdriver?
NoSuchElementException
NoSuchElementError
NullPointerException
ObjectNotFoundException
Cannot predict the name of error/ exception
Q5: Kevin is designing an automation test, where test data is specified in an external excel file.
Which command will be helpful to write the data into a cell of the excel file? Assume c1 is the cell
object.
a c1.setCellValue("data")
b c1.setValue(“data”)
c c1.writeCellValue(“data”)
d c1.setCellData(“data”)
Q6: Which of the following is correct about generating about an XML suite file in TestNG for Test
Suite Exception.
(a) TestNG XML suite can be generated at time of creating TestNG class.
(b) TestNG XML suite can be generated using "Convert to testNG" option..........class is
created.
(c) TestNG XML suite file is automatically generated when user create a maven java
project.
(d) There is no option in Eclipse to generate XML suite file.
(e)TestNG XML suite file can be generated by Jenkins
Q7: Which of the following Java classes are from the Extent API library?
ExtentReports
Status
TakesScreenshot
Actions
Q8: Sean wants to switch to multiple frames on a web page when an operation is completed on a
frame and test flow needs to move to another frame. Calling the driver.switch To().frame()
immediately will not move the context to the next frame which is at the same level in DOM. The
test will first need to switch to the main document and then activate the desired frame. Which
method is used to switch back to the main document from the frame?
driver switch To().body()
driver.switch To().mainDocument()
driver switch To().defaultDocument()
driver.switchTo().defaultContent()
Q9: Sam is designing an automation test, where test data is specified in an external excel file. Which
command will be helpful to get across to the 2nd
sheet of excel file. Assume wb is the workbook
object.
a wb.getSheetAt(1)
b wb.getSheetAt(2)
c wb.getSheet(1)
d wb.getSheet(2)
Q10: Sean is performing verification using Assert class functions from TestNG. Suggest him the
corect method to verify the reference/address of the two objects to be identical
assert True(Object1,Object2)
assertRef(Obect1,Object2)
assertEquals(Object1,Object2)
assertSame(Object1,Object2)
Q11: Sean is coding an automation Script to launch the web application on a browser window.
Which of the following listed option(s) will help Sean to lunch the desired application on a web
browser in selenium?
(a). driver.get(“URL”)
(b). driver.navigate().to(“URL”)
(c). driver.navigate(“URL”)
(d). driver.getUrl(“URL”)
(e). driver.setUrl(“URL”)
Ans: (a) driver.get("URL")
(b) driver.navigate().to("URL")
Q12: Sarah is coding an automation Script to locate a child element in an unordered list. The list is
given below:
<html>
<body>
<ul class=”cities”>
<li>Bangalore</li>
<li>Chennai</li>
<li>Hydrabad</li>
<li>Mumbai</li>
<li>Pune</li>
</ul>
</body>
</html>
Sarah wants to locate the 3rd
child element i.e Hydrabad. Suggest the appropriate locator stratgy
for
Sarah.
(e) CSS = “ul:cities li:nth-child(2)”
(f) CSS = “ul:cities li:nth-of-type(“Hydrabad”)
(g) CSS =” ul:cities li:nth-child(“Hydrabad”)
(h) CSS= “ul:cities li:nth-child(])”
Ans: (b) css="ul.cities li:nth-of-type("Hyderabad")
Q13: Sarah is coding an automation script, where she has to validate the price of the holiday
package based on the drag & drop of island city from the menu. The Price is fetched from the
server and displays without reloading the web page. Which WebDriver Library class has the
predefined conditions for handling dynamic waits in Selenium WebDriver Library?
ExplicitWait
ImplicitWait
WebDriverWait
Expected Conditions
Q14: What are the various status options available in the Extent reports library?
e. PASS,FAIL,SKIP,FATAL,ERROR,WARNING,INFO
f. SUCCESS,FAIL,SKIP ,ERROR,WARNING,INFO
g. DONE,DEBUG,FAIL,SKIP,ERROR,WARNING,INFO
h. ABORT,PASS,FAIL,DONE,ERROR,WARNING,INFO
Q15: Kevin wants to fetch all the data from the country drop down menu and verify the data against
data from the database. He is looking into the library for a method to fetch all the data from the
country drop down box. Which method will help Kevin?
f. selectAllOptions()
g. getOptions()
h. getAllOptions()
i. getData()
j. getText()
Q16: Which java interface is used to capture screenshot of a web page using Web Driver API?
ANS: TakeScreenshot
Q17: There is an element on the webpages when inspected on the browser it looks like <div
call=”errorMsg”>Error Message</div>.
James wants to use selenium locations to identify the element. Choose the correct set of commands
to locate the elements efficiently.
Ans: By.CSS Selector(“div#errorMsg”)
By.CSS Selector(“div.errorMsg”)
By.CSS Selector(“div_errorMsg”)
By.CSS Selector(“errorMsg”)
Q18: ) Henry is designing a script and using CSS Selector as the locator strategy. He must locate the
element effectively. The element inspected looks like:
<input id="nowPassword" type="password">
Choose the most appropriate option.
Ans:-By. CssSelector(“id=newPassword”)
By .CssSelector(“input.newPassword”)
By .CssSelector(“input_newPassword”)
By .CssSelector(“input[id$=’Password’]”)
Q19: Kevin is using a CSS Selector as a locator strategy for the following element:
<h1 id=“msg01” name=“success”>Registration completed</h1>
He must identify the element effectively.
ANS –
By.cssSelector(“h1[id=‘msg01’]”)
By.cssSelector(“h1[id=‘msg01’][name=‘success’]”)
Q20: Select the correct order of execution of annotations, as per the life cycle of the TestNG which
can be applied for test methods along with beforeXXXX – afterXXXX methods. ANS - @BeforeTest,
@BeforeClass, @BeforeMethod, @Test, @AfterMethod, @AfterClass, @AfterTest
Q21: Testing an automation script to test a web application. He has to store the Logout link in the
using a driver.findElement() method. Suggest Sean with a compatible return to leg out least object.
(a) String
(b) WebDriver
(c) WebElement
(d) List
Ans: (c) WebElement
1Q) Sean is coding an automation script to test a web application. He has to store the Logout Ink
in a Java vanable using a driver findElement() method. Suggest Sean with a compatible return type
to store the Log out test object.
Choose the best option
a) String
b) WebDnver
c) WebElement
d) List
2Q) Consider the below hlml code snippet
Email : <label id='Email' class='style 1' name='input>
Which is the best localor to identify the Email web element?
Choose the most appropnate option.
a) By.className('style1’)
b) By.id(‘Email')
c) By.name(‘Email’)
d) By.xpath(‘//label[@id='Email’]’)
3Q) James is automating a scnpt and using CSS Seleclor as a localor. What are the primitive
types for designing the CSS Selector?
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf
selenium_master.pdf

More Related Content

What's hot

Test Automation Strategy
Test Automation StrategyTest Automation Strategy
Test Automation StrategyMartin Ruddy
 
Test automation - What? Why? How?
Test automation - What? Why? How?Test automation - What? Why? How?
Test automation - What? Why? How?Anand Bagmar
 
Automated Testing vs Manual Testing
Automated Testing vs Manual TestingAutomated Testing vs Manual Testing
Automated Testing vs Manual TestingDirecti Group
 
Introduction to Test Automation
Introduction to Test AutomationIntroduction to Test Automation
Introduction to Test AutomationPekka Klärck
 
ISTQB Foundation - Chapter 3
ISTQB Foundation - Chapter 3ISTQB Foundation - Chapter 3
ISTQB Foundation - Chapter 3Chandukar
 
Regression Testing - An Overview
Regression Testing - An OverviewRegression Testing - An Overview
Regression Testing - An OverviewBugRaptors
 
Automation testing strategy, approach & planning
Automation testing  strategy, approach & planningAutomation testing  strategy, approach & planning
Automation testing strategy, approach & planningSivaprasanthRentala1975
 
Introduction to Automation Testing
Introduction to Automation TestingIntroduction to Automation Testing
Introduction to Automation TestingArchana Krushnan
 
Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...
Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...
Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...Ankit Prajapati
 
What is Regression Testing? | Edureka
What is Regression Testing? | EdurekaWhat is Regression Testing? | Edureka
What is Regression Testing? | EdurekaEdureka!
 
New trends in testing automation
New trends in testing automationNew trends in testing automation
New trends in testing automationEran Kinsbrunner
 
Software testing.ppt
Software testing.pptSoftware testing.ppt
Software testing.pptKomal Garg
 
Test Automation Strategies For Agile
Test Automation Strategies For AgileTest Automation Strategies For Agile
Test Automation Strategies For AgileNaresh Jain
 
Manual testing concepts course 1
Manual testing concepts course 1Manual testing concepts course 1
Manual testing concepts course 1Raghu Kiran
 
Mobile Application Testing Strategy
Mobile Application Testing StrategyMobile Application Testing Strategy
Mobile Application Testing StrategyankitQA
 

What's hot (20)

Test Automation Strategy
Test Automation StrategyTest Automation Strategy
Test Automation Strategy
 
Test automation - What? Why? How?
Test automation - What? Why? How?Test automation - What? Why? How?
Test automation - What? Why? How?
 
Automated Testing vs Manual Testing
Automated Testing vs Manual TestingAutomated Testing vs Manual Testing
Automated Testing vs Manual Testing
 
Introduction to Test Automation
Introduction to Test AutomationIntroduction to Test Automation
Introduction to Test Automation
 
ISTQB Foundation - Chapter 3
ISTQB Foundation - Chapter 3ISTQB Foundation - Chapter 3
ISTQB Foundation - Chapter 3
 
Test Automation - Keytorc Approach
Test Automation - Keytorc Approach Test Automation - Keytorc Approach
Test Automation - Keytorc Approach
 
Types of testing
Types of testingTypes of testing
Types of testing
 
Regression Testing - An Overview
Regression Testing - An OverviewRegression Testing - An Overview
Regression Testing - An Overview
 
Automation testing strategy, approach & planning
Automation testing  strategy, approach & planningAutomation testing  strategy, approach & planning
Automation testing strategy, approach & planning
 
Introduction to Automation Testing
Introduction to Automation TestingIntroduction to Automation Testing
Introduction to Automation Testing
 
Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...
Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...
Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...
 
What is Regression Testing? | Edureka
What is Regression Testing? | EdurekaWhat is Regression Testing? | Edureka
What is Regression Testing? | Edureka
 
Testing fundamentals
Testing fundamentalsTesting fundamentals
Testing fundamentals
 
New trends in testing automation
New trends in testing automationNew trends in testing automation
New trends in testing automation
 
Software testing.ppt
Software testing.pptSoftware testing.ppt
Software testing.ppt
 
Test Automation Strategies For Agile
Test Automation Strategies For AgileTest Automation Strategies For Agile
Test Automation Strategies For Agile
 
Sanity testing and smoke testing
Sanity testing and smoke testingSanity testing and smoke testing
Sanity testing and smoke testing
 
Manual testing concepts course 1
Manual testing concepts course 1Manual testing concepts course 1
Manual testing concepts course 1
 
Mobile Application Testing Strategy
Mobile Application Testing StrategyMobile Application Testing Strategy
Mobile Application Testing Strategy
 
Automation testing
Automation testingAutomation testing
Automation testing
 

Similar to selenium_master.pdf

21: Which method determines if a JRadioButton is selected?
21: Which method determines if a JRadioButton is selected?21: Which method determines if a JRadioButton is selected?
21: Which method determines if a JRadioButton is selected?sukeshsuresh189
 
Comp 328 final guide (devry)
Comp 328 final guide (devry)Comp 328 final guide (devry)
Comp 328 final guide (devry)sukeshsuresh189
 
6: Which of the following statements about creating arrays and initializing t...
6: Which of the following statements about creating arrays and initializing t...6: Which of the following statements about creating arrays and initializing t...
6: Which of the following statements about creating arrays and initializing t...sukeshsuresh189
 
5: Every Java application is required to have
5: Every Java application is required to have5: Every Java application is required to have
5: Every Java application is required to havesukeshsuresh189
 
15: Which method call converts the value in variable stringVariable to an int...
15: Which method call converts the value in variable stringVariable to an int...15: Which method call converts the value in variable stringVariable to an int...
15: Which method call converts the value in variable stringVariable to an int...sukeshsuresh189
 
16: Which of the following is the method used to display a dialog box to gath...
16: Which of the following is the method used to display a dialog box to gath...16: Which of the following is the method used to display a dialog box to gath...
16: Which of the following is the method used to display a dialog box to gath...sukeshsuresh189
 
13: What do the following statements do?
13: What do the following statements do?13: What do the following statements do?
13: What do the following statements do?sukeshsuresh189
 
Comp 328 final guide (devry)
Comp 328 final guide (devry)Comp 328 final guide (devry)
Comp 328 final guide (devry)sukeshsuresh189
 
7: Assume the following class declaration.
7: Assume the following class declaration.7: Assume the following class declaration.
7: Assume the following class declaration.sukeshsuresh189
 
14: Consider the class below:
14: Consider the class below:14: Consider the class below:
14: Consider the class below:sukeshsuresh189
 
18: Which of the following does not generate an event?
18: Which of the following does not generate an event?18: Which of the following does not generate an event?
18: Which of the following does not generate an event?sukeshsuresh189
 
17: provides the basic attributes and behaviors of a window—a title bar at th...
17: provides the basic attributes and behaviors of a window—a title bar at th...17: provides the basic attributes and behaviors of a window—a title bar at th...
17: provides the basic attributes and behaviors of a window—a title bar at th...sukeshsuresh189
 
23: Which layout manager is the default for JPanel?
23: Which layout manager is the default for JPanel?23: Which layout manager is the default for JPanel?
23: Which layout manager is the default for JPanel?sukeshsuresh189
 
1: The .class extension on a file means that the file
1:  The .class extension on a file means that the file1:  The .class extension on a file means that the file
1: The .class extension on a file means that the filesukeshsuresh189
 
4: Which of the following is a Scanner method?
4: Which of the following is a Scanner method?4: Which of the following is a Scanner method?
4: Which of the following is a Scanner method?sukeshsuresh189
 
Comp 328 final guide (devry)
Comp 328 final guide (devry)Comp 328 final guide (devry)
Comp 328 final guide (devry)sukeshsuresh189
 
10: In the Java graphics system, coordinate units are measured in ________.
10: In the Java graphics system, coordinate units are measured in ________.10: In the Java graphics system, coordinate units are measured in ________.
10: In the Java graphics system, coordinate units are measured in ________.sukeshsuresh189
 
12: When an object is concatenated with a String
12: When an object is concatenated with a String12: When an object is concatenated with a String
12: When an object is concatenated with a Stringsukeshsuresh189
 
22: The logical relationship between radio buttons is maintained by objects o...
22: The logical relationship between radio buttons is maintained by objects o...22: The logical relationship between radio buttons is maintained by objects o...
22: The logical relationship between radio buttons is maintained by objects o...sukeshsuresh189
 

Similar to selenium_master.pdf (20)

SWE-6 TESTING.pptx
SWE-6 TESTING.pptxSWE-6 TESTING.pptx
SWE-6 TESTING.pptx
 
21: Which method determines if a JRadioButton is selected?
21: Which method determines if a JRadioButton is selected?21: Which method determines if a JRadioButton is selected?
21: Which method determines if a JRadioButton is selected?
 
Comp 328 final guide (devry)
Comp 328 final guide (devry)Comp 328 final guide (devry)
Comp 328 final guide (devry)
 
6: Which of the following statements about creating arrays and initializing t...
6: Which of the following statements about creating arrays and initializing t...6: Which of the following statements about creating arrays and initializing t...
6: Which of the following statements about creating arrays and initializing t...
 
5: Every Java application is required to have
5: Every Java application is required to have5: Every Java application is required to have
5: Every Java application is required to have
 
15: Which method call converts the value in variable stringVariable to an int...
15: Which method call converts the value in variable stringVariable to an int...15: Which method call converts the value in variable stringVariable to an int...
15: Which method call converts the value in variable stringVariable to an int...
 
16: Which of the following is the method used to display a dialog box to gath...
16: Which of the following is the method used to display a dialog box to gath...16: Which of the following is the method used to display a dialog box to gath...
16: Which of the following is the method used to display a dialog box to gath...
 
13: What do the following statements do?
13: What do the following statements do?13: What do the following statements do?
13: What do the following statements do?
 
Comp 328 final guide (devry)
Comp 328 final guide (devry)Comp 328 final guide (devry)
Comp 328 final guide (devry)
 
7: Assume the following class declaration.
7: Assume the following class declaration.7: Assume the following class declaration.
7: Assume the following class declaration.
 
14: Consider the class below:
14: Consider the class below:14: Consider the class below:
14: Consider the class below:
 
18: Which of the following does not generate an event?
18: Which of the following does not generate an event?18: Which of the following does not generate an event?
18: Which of the following does not generate an event?
 
17: provides the basic attributes and behaviors of a window—a title bar at th...
17: provides the basic attributes and behaviors of a window—a title bar at th...17: provides the basic attributes and behaviors of a window—a title bar at th...
17: provides the basic attributes and behaviors of a window—a title bar at th...
 
23: Which layout manager is the default for JPanel?
23: Which layout manager is the default for JPanel?23: Which layout manager is the default for JPanel?
23: Which layout manager is the default for JPanel?
 
1: The .class extension on a file means that the file
1:  The .class extension on a file means that the file1:  The .class extension on a file means that the file
1: The .class extension on a file means that the file
 
4: Which of the following is a Scanner method?
4: Which of the following is a Scanner method?4: Which of the following is a Scanner method?
4: Which of the following is a Scanner method?
 
Comp 328 final guide (devry)
Comp 328 final guide (devry)Comp 328 final guide (devry)
Comp 328 final guide (devry)
 
10: In the Java graphics system, coordinate units are measured in ________.
10: In the Java graphics system, coordinate units are measured in ________.10: In the Java graphics system, coordinate units are measured in ________.
10: In the Java graphics system, coordinate units are measured in ________.
 
12: When an object is concatenated with a String
12: When an object is concatenated with a String12: When an object is concatenated with a String
12: When an object is concatenated with a String
 
22: The logical relationship between radio buttons is maintained by objects o...
22: The logical relationship between radio buttons is maintained by objects o...22: The logical relationship between radio buttons is maintained by objects o...
22: The logical relationship between radio buttons is maintained by objects o...
 

Recently uploaded

Contemporary Economic Issues Facing the Filipino Entrepreneur (1).pptx
Contemporary Economic Issues Facing the Filipino Entrepreneur (1).pptxContemporary Economic Issues Facing the Filipino Entrepreneur (1).pptx
Contemporary Economic Issues Facing the Filipino Entrepreneur (1).pptxMarkAnthonyAurellano
 
VIP Kolkata Call Girl Howrah 👉 8250192130 Available With Room
VIP Kolkata Call Girl Howrah 👉 8250192130  Available With RoomVIP Kolkata Call Girl Howrah 👉 8250192130  Available With Room
VIP Kolkata Call Girl Howrah 👉 8250192130 Available With Roomdivyansh0kumar0
 
NewBase 19 April 2024 Energy News issue - 1717 by Khaled Al Awadi.pdf
NewBase  19 April  2024  Energy News issue - 1717 by Khaled Al Awadi.pdfNewBase  19 April  2024  Energy News issue - 1717 by Khaled Al Awadi.pdf
NewBase 19 April 2024 Energy News issue - 1717 by Khaled Al Awadi.pdfKhaled Al Awadi
 
BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,noida100girls
 
Sales & Marketing Alignment: How to Synergize for Success
Sales & Marketing Alignment: How to Synergize for SuccessSales & Marketing Alignment: How to Synergize for Success
Sales & Marketing Alignment: How to Synergize for SuccessAggregage
 
8447779800, Low rate Call girls in Saket Delhi NCR
8447779800, Low rate Call girls in Saket Delhi NCR8447779800, Low rate Call girls in Saket Delhi NCR
8447779800, Low rate Call girls in Saket Delhi NCRashishs7044
 
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In.../:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...lizamodels9
 
8447779800, Low rate Call girls in Tughlakabad Delhi NCR
8447779800, Low rate Call girls in Tughlakabad Delhi NCR8447779800, Low rate Call girls in Tughlakabad Delhi NCR
8447779800, Low rate Call girls in Tughlakabad Delhi NCRashishs7044
 
Future Of Sample Report 2024 | Redacted Version
Future Of Sample Report 2024 | Redacted VersionFuture Of Sample Report 2024 | Redacted Version
Future Of Sample Report 2024 | Redacted VersionMintel Group
 
Keppel Ltd. 1Q 2024 Business Update Presentation Slides
Keppel Ltd. 1Q 2024 Business Update  Presentation SlidesKeppel Ltd. 1Q 2024 Business Update  Presentation Slides
Keppel Ltd. 1Q 2024 Business Update Presentation SlidesKeppelCorporation
 
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort Service
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort ServiceCall US-88OO1O2216 Call Girls In Mahipalpur Female Escort Service
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort Servicecallgirls2057
 
Digital Transformation in the PLM domain - distrib.pdf
Digital Transformation in the PLM domain - distrib.pdfDigital Transformation in the PLM domain - distrib.pdf
Digital Transformation in the PLM domain - distrib.pdfJos Voskuil
 
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...lizamodels9
 
Call Us 📲8800102216📞 Call Girls In DLF City Gurgaon
Call Us 📲8800102216📞 Call Girls In DLF City GurgaonCall Us 📲8800102216📞 Call Girls In DLF City Gurgaon
Call Us 📲8800102216📞 Call Girls In DLF City Gurgaoncallgirls2057
 
Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...
Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...
Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...lizamodels9
 
Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...
Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...
Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...lizamodels9
 
India Consumer 2024 Redacted Sample Report
India Consumer 2024 Redacted Sample ReportIndia Consumer 2024 Redacted Sample Report
India Consumer 2024 Redacted Sample ReportMintel Group
 
2024 Numerator Consumer Study of Cannabis Usage
2024 Numerator Consumer Study of Cannabis Usage2024 Numerator Consumer Study of Cannabis Usage
2024 Numerator Consumer Study of Cannabis UsageNeil Kimberley
 
Call Girls In Connaught Place Delhi ❤️88604**77959_Russian 100% Genuine Escor...
Call Girls In Connaught Place Delhi ❤️88604**77959_Russian 100% Genuine Escor...Call Girls In Connaught Place Delhi ❤️88604**77959_Russian 100% Genuine Escor...
Call Girls In Connaught Place Delhi ❤️88604**77959_Russian 100% Genuine Escor...lizamodels9
 
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...lizamodels9
 

Recently uploaded (20)

Contemporary Economic Issues Facing the Filipino Entrepreneur (1).pptx
Contemporary Economic Issues Facing the Filipino Entrepreneur (1).pptxContemporary Economic Issues Facing the Filipino Entrepreneur (1).pptx
Contemporary Economic Issues Facing the Filipino Entrepreneur (1).pptx
 
VIP Kolkata Call Girl Howrah 👉 8250192130 Available With Room
VIP Kolkata Call Girl Howrah 👉 8250192130  Available With RoomVIP Kolkata Call Girl Howrah 👉 8250192130  Available With Room
VIP Kolkata Call Girl Howrah 👉 8250192130 Available With Room
 
NewBase 19 April 2024 Energy News issue - 1717 by Khaled Al Awadi.pdf
NewBase  19 April  2024  Energy News issue - 1717 by Khaled Al Awadi.pdfNewBase  19 April  2024  Energy News issue - 1717 by Khaled Al Awadi.pdf
NewBase 19 April 2024 Energy News issue - 1717 by Khaled Al Awadi.pdf
 
BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
 
Sales & Marketing Alignment: How to Synergize for Success
Sales & Marketing Alignment: How to Synergize for SuccessSales & Marketing Alignment: How to Synergize for Success
Sales & Marketing Alignment: How to Synergize for Success
 
8447779800, Low rate Call girls in Saket Delhi NCR
8447779800, Low rate Call girls in Saket Delhi NCR8447779800, Low rate Call girls in Saket Delhi NCR
8447779800, Low rate Call girls in Saket Delhi NCR
 
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In.../:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
 
8447779800, Low rate Call girls in Tughlakabad Delhi NCR
8447779800, Low rate Call girls in Tughlakabad Delhi NCR8447779800, Low rate Call girls in Tughlakabad Delhi NCR
8447779800, Low rate Call girls in Tughlakabad Delhi NCR
 
Future Of Sample Report 2024 | Redacted Version
Future Of Sample Report 2024 | Redacted VersionFuture Of Sample Report 2024 | Redacted Version
Future Of Sample Report 2024 | Redacted Version
 
Keppel Ltd. 1Q 2024 Business Update Presentation Slides
Keppel Ltd. 1Q 2024 Business Update  Presentation SlidesKeppel Ltd. 1Q 2024 Business Update  Presentation Slides
Keppel Ltd. 1Q 2024 Business Update Presentation Slides
 
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort Service
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort ServiceCall US-88OO1O2216 Call Girls In Mahipalpur Female Escort Service
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort Service
 
Digital Transformation in the PLM domain - distrib.pdf
Digital Transformation in the PLM domain - distrib.pdfDigital Transformation in the PLM domain - distrib.pdf
Digital Transformation in the PLM domain - distrib.pdf
 
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
 
Call Us 📲8800102216📞 Call Girls In DLF City Gurgaon
Call Us 📲8800102216📞 Call Girls In DLF City GurgaonCall Us 📲8800102216📞 Call Girls In DLF City Gurgaon
Call Us 📲8800102216📞 Call Girls In DLF City Gurgaon
 
Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...
Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...
Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...
 
Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...
Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...
Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...
 
India Consumer 2024 Redacted Sample Report
India Consumer 2024 Redacted Sample ReportIndia Consumer 2024 Redacted Sample Report
India Consumer 2024 Redacted Sample Report
 
2024 Numerator Consumer Study of Cannabis Usage
2024 Numerator Consumer Study of Cannabis Usage2024 Numerator Consumer Study of Cannabis Usage
2024 Numerator Consumer Study of Cannabis Usage
 
Call Girls In Connaught Place Delhi ❤️88604**77959_Russian 100% Genuine Escor...
Call Girls In Connaught Place Delhi ❤️88604**77959_Russian 100% Genuine Escor...Call Girls In Connaught Place Delhi ❤️88604**77959_Russian 100% Genuine Escor...
Call Girls In Connaught Place Delhi ❤️88604**77959_Russian 100% Genuine Escor...
 
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
 

selenium_master.pdf

  • 1. 1) Which of the following field/column for requirements in excel format is used to map the requirements folder in ALM? Ans: Path 2) Which of the following best defines ALM as an integrated repository? Ans: Link between requirements with releases & cycles Link between defects with releases & cycles 3) By default, what does application life cycle management (ALM) assign when a new defect is created? Ans: A unique defect IO 4) Which of the following sections allows you to view coverage by cycle? Ans: Requirement coverage 5) How many defects can be associated with a requirement? Ans: Multiple defects 6) Which of the following elements of JMeter determines the order in which the requests have to get processed? Ans: Logic controllers 7) Which one of the following is not a controller in JMeter? Ans: Condition controller 8) Which of the following represents a process where samplers are executes with multiple sets of user input data? Ans: Parameterization 9) Which of the following statements is true about pre-processors? Ans: Pre-processors execute before the sampler requests are executed in the test plan (only a)
  • 2. 10) Which assertion is used to test whether the API server response was received within a given amount of time or not? Ans: Duration 11) Which of the following defect states is marked by the developer when he is analyzing the defect description? Ans: Open 12) Which of the following test defines “Verification” & “Validation”? Ans: Verification: Lalitha is reviewing the test script conduct by raju Validation: Raju is updating the requirements traceability matrix for the requirement coverage 13) John has raised a high priority defect in the morning and is waiting for the fix to be completed. At 5pm he got a fix from the developer. Now he also need to check the fix implemented does not introduce any new defects on the system. What type of testing is he performing? Ans: Regression testing 14) Consider the below html code snippet Email:<label id=”Email” class=”Style1” name=”input”> Which of the best locator to identify the Email web element? Ans: By id (“Email”) 15) Which method in the web driver library is used to get the attribute value of a web element? Ans: getAttribute(“AttributeName”) 16) Sarah is coding an automation script, where she has to validate the price of the holiday package based on the drag and drop of island only from the menu. The price is fetched from the server and displays without reloading the webpage. Which web driver library class has the pre defined conditions for handling dynamic waits in selenium webdriver library? Ans: WebDriver wait
  • 3. 17) Which of the following statement(s) is/are about the extent reports? Ans: All of the above : Extent reports are customisable HTML Reports Extent reports can be integrated with Selenium webdriver using TestNG/Junit test frameworks Extent reports can add events, screenshots, tags, devices, and any other related information about test environment 18) Sean is coding an automation script for emulating user actions by mouse using the webdriver library. Assist sean to choose the correct syntax to create an object for actions class from the following Ans: Actions act=new Actions(driver instance) 19) Which Java interface is used to capture screenshot of a webpage using webdriver API? Ans: TakeScreenshot 20) Sean wants to switch to multiple frames on a webpage when an operation is completed on a frame an test flow needs to move to another frame, calling the driver.SwitchTo().frame() immediately will not move the context to the next frame which is at the same level in DCM. The test will first need to switch to the main document and then activate the desired frame which method is used to switch back to the main document from the frame? Ans: driver.SwithTo().defaultContent() 21) Samatha wants to write an automation script that determines the count of hobbies check boxes. These check boxes have a name attribute as ”hobbies”. Assist Samatha by choosing the correct command Ans: Driver.dindElements.By.name(“hobbies”).size() 22) Samatha is automating a test scenario. This scenario involves a pop up of a confirmation window. She wants to interact with the pop up window and decline the confirmation pop-up window that shows a message “Do you want to cancel the payment?”. Choose correct code Ans: Driver.SwithchTo().alert().dismiss()
  • 4. 23) Sarah is coding an automation script to switch to frame in a web application. Help her to switch a particular frame on a web page using the window library. She wants to interact with the pop up window and decline the confirmation pop up window show a message “Do you want to cancel the payment?”. Assist Samantha to interact with Ans: Driver.SwitchTo().frame(int index) Driver.SwitchTo().frame(String name or id) 24) Which of the following is correct about generating an XML Suite file is TestNG for Test Suite execution? Ans: Test NG XML suite file Can be generated at the time of creating TestNG class TestNG XML suite file can be generated using convert to TestNG option in Eclipse after a java code 25) Sarah is designing an automation script using descriptive programming in UFT for a web based Flight GUI application. Assist sarah with a tool to identify the property of the test scripts Ans: Object Spy 26) Sarah wants to slice a text to perform a test on a message. She used the split function in VB Scripting to chop the strings. Predict the output for the below code Arr=Split(“this ”is ”VB”Scripting”,” ‘ ”) Msgbox arr(2) Ans: VB 27) In UFT which type of variable can be accessed by all actions, function libraries and tests that have a global scope? Ans: Environment variable 28) Which of the following types of applications can be tested using UFT? Ans: Web app, SOAP and REST APIs
  • 5. 29) A retail application generates an order id on successful order placing. Order id follows the pattern. Starts with TXN, followed by 3 digit number and ends with any capital alphabet Ans: ^TXNd[3]{A-Z}$ 30) Jack wants to apply checkpoint in an existing test script. He decides to use keyword view to insert checkpoint. Which all checkpoints can be inserted using keyword view? Ans: Only standard 31) What type of action can we create if others want to reuse that action, but at the same time, it should be non-editable for others? Ans: Reusable action 32) Chetan wants to add some additional information like the environment for test execution, which method can be used to add the information in the test method? Ans: Add Run Information 33) Predict the output for the below code snippet Msgbox (“UFT” & String(3,”T”)) Ans: 6 34) Many wants to add the HTML report snippet to have better clarity in the test results. Which Reporter object method can be added to achieve the task? Ans: ReportHTMLEvent 35) There are various elements in a SOAP message. Which element of the SOAP message shows error message and status information? Ans: Fault 36) Lisa is a new joiner to cucumber project assigned to execute the scenarios marked as both OAT and UAT tags. Which of the following will assist Lisa to execute the desired Scenario using tags from Cucumber option? Ans: @CucumberOptions(tags=(“@OAT”,”@UAT”))
  • 6. 37) Henry wants to write some comments in the feature file. Which character command is used to define comments in the feature file? Ans: # 38) Kevin is creating a feature file with multiple scenarios. He wants to apply multiple tags to a scenario. Which of the following best requirements the technique to apply multiple tag names? Ans: @Tag1,@Tag2 39) Which statements are true about feature file? Ans: only 1, 2 & 3 : A feature file contains multiple scenarios Feature Gherkin keyword is always written as first high level keyword in a feature file There can be multiple feature file in a project 40) No question @when(“Kevin enters quantity as{int}item(3)”) @Then(“Shopping cart icon shows {int}”) 41) Which of the following is not a valid element in the JMeter test plan? Ans: Annotation 42) Which of the following is past processor in JMeter ? Ans: Regular expression Evaluator 43) Which of the following parameters can be configured using a thread group? Ans: Ramp-up period Loop count 44) Which among the following is an invalid controller in JMeter? Ans: State controller 45) Which of the following fields in the defect log helps the tester to prioritize and fix the defect?
  • 7. Ans: Severity 46) Sean is coding an automation script to test a web application. He has to store the largest link in a java variable using a driver find element() method. Suggest Sean with a compatible return type to store the logout test object? Ans: WebElement 47) James want to automate the selection of ID proofs drop down box in the web application . He has to verify the drop down box has a selection of more than one option. Which of the following method is suggested to JMeter? Ans: Ismultiple() 48) When verification fails in TestNG. What forces the test to stop execution and mark as fail? Ans: Assertion Fail 49) Kavin wants to generate extensive report for the test automation project. He decides to use Extent reports library. Which class in this library is used to create labels, code blocks and labels in the report? Ans: Markup Helper 50) Sean configured this project for the test Suite execution using TestNG. He wants to perform parallel execution using TestNG. Which attribute represents the parallel execution of the test cases? Ans: Parallel=”tests” 51. Kevin is using CSS selector as a locator strategy for the following element <h1 id =”msg1” name=”success”>Registration completed</h1>. He must identify the element efficiently. Ans: .By CSS Selector(“h1[id=’msg01’]”) .By CSS Selector(“h1[id=’msg01’][name=’success’]”) 52. There is an element on the webpages when inspected on the browser it looks like <div call=”errorMsg”>Error Message</div>. James wants to use selenium locations to identify the element. Choose the correct set of commands to locate the elements efficiently.
  • 8. Ans: By CSS Selector(“div.errorMsg”) 53. Sarah wants to automate the selection of only one option from a dropdown box as shown below <html> <body> <select multiple> <option value=”web”>html</option> <option value=”prog”>python</option> <option value=”prog”>java</option> <option value=”prog”>python</option> <option value=”prog”>java</option> </select> </body> </html>. Sarah has to select only the fourth option,i.e,python from the options field. Ans: Select By Index() 54. Identify the valid statement from the below given options. Ans: Browser(name i=Demowebshop).page(page i=”.*”).WebEdit(“Emailiq”) Set Prince 55. Neha is an automation tester working for TestMe project. She wants to log some information in the UFT tet result pane. Which reporter object method is more relevant in the situation? Ans: MicDone
  • 9. 56. UFT supports various debugging techniques that help us in finding the issues in the automation script. Which technique allows us to change the value of local variables at runtime to understand the behaviour? Ans: Console 57. Which of the following statements regarding actions in UFT is incorrect? Ans: In actions, parameters are passed by value and by 58. To execute a cucumber scenario, which file(s) are important and must be created in the maven project? Ans: .feature file, .step definition 59. Henry wants to generate JSON reports on the execution of Test Runner in cucumber. Assert Henry with the right option to configure the JSON report generation in @Cucumber options? Ans: @Cucumber Options({plugin=pretty,”html:report.html”}) 60. Henry has created a feature file with tagged scenarios. He wants to execute all the scenarios excluding “SevereTag” scenarios. What command should he use in cucumber options for TestRunner class? Ans: tags=(“~@SevereTag”) 61. Which of the following will control the amount of time Jmeter will execute a test plan? Ans: Test duration 62. Which of the following types of applications can be tested using Jmeter? Ans: All of these 63. Jude is testing the login page of an application that contains 10 fields. He has analyzed the data dictionary to derive the test data for the login page. He has tested the application with all the combinations as it was a mandatory task required for the project. However, he is sure that 0% of defects do not guarantee the process success from the customers perspective, please predict the testing principle that he is referring to in the above statement? Ans: Exhausting testing not possible
  • 10. 64. Which of the following styles of writing test scenario ids will represent clearly the referenced test scenario and help the testing team for tracking purposes? Ans: 65. Sean is coding to automate a test scenario in which he has to click on a dynamic link to navigate to the shopping cart page. The web element looks like <a href=”icart.jsp? params”>cart[19]</a>. Which locator is most recommended for the scan to identify the cart web element for all test iterations ? Ans: By.partial link Text() 66. Kevin wants to fetch all the data from the country dropdown menu and verify the data against data from the database. He is looking into the library for a method to fetch all the data from the country dropdown box .Which method helps Kevin? Ans: get options() 67. What does double forward slash // represent in xpath selenium locations? Ans: relative xpath 68. Kevin is planning to write automation script for below scenario. Given the user is on the payment page. He views a textbox with attribute values . “Enter Mobile Number” written in the box. The user must enter the mobile number in the box to proceed. Please choose the correct command to help Kevin in automating the scenario. Assume the textbox element is already identified and stored in mobile txt box variable . Ans: mobileTxtBox.sendKeys(“xxxxxxxxxx”) 69. Henry is designing a script and using CSS selector as the locator strategy. He must locate the element efficiently. The element inspected looks like <input id=”new password” type=”password”>. Ans: By CSS Selector(“input[id=password]”)
  • 11. 70. Kevin is designing an automation test, where test data is specified in an external excel file. Which command will be helpful to write the data into a cell of the excel file? Assume c1 is the cell object. Ans: c1.SetCellValue(‘data’) 71. <html> <body> <ul class = ”cities” > <li>Bangalore</li> <li>Chennai</li> <li>Mumbai</li> <li>Bangalore</li> <li>Pune</li> </ul> </body> </html> Sarah wants to locate the 3rd child element i.e. Hyderabad.Suggest the appropriate locator strategy by Sarah. ANS- CSS=”ul.cities.li inth of type(“Hyderabad”)” 72. UFT supports various synchronization techniques that helps us to manage web applications. Which technique is applied only to webpages and browsers ? ANS- Sync. 73. Consider a test String to be “order 200 completed”. which of the below regular expression(s) will not match the given string? ANS- order [0-9]+Completed 74. Henry had bined a project team. The team is using the BDD framework for effective testing . Henry must understand keywords in Cucumber. Which gherkin keyword indicates the pre-conditions / pre- requests steps in a feature file?
  • 12. ANS- Given 75. Samantha has created a feature file in a project. she wants to configure the Test Runner class using feature files/glue tags. Which of the following is the correct set annotations to be used in the test runner? ANS- @Runwith ; @Cucumber options. 76. Write in corect order a. Triggers the build b. Open reports to see the latest test results c. Jenkins checks the Git Repository periodically to detect changes in build project. d. The build is successful / Failure. e. Testers/ Developers commits source code changes to the shared Git Repository ANS- 77. Which of the following elements of Jmeter executes after the sampler requests are executed in the test plan? ANS- Post Processors. 78. Sarah is coding in a test scenario, in which she must fetch the booking id as a text message from the span element The web element looks like <Space> order completed with Booking id:6665<Space> Help Sarah to find a method from the webdriver library to fetch the booking ID? Ans- get Text(); 79. James is automating a script and using CSS Selector as a locator. What are the primitive types for designing the CSS selector? ANS- .id, . Attribute, .innerText()
  • 13. 80. Which expression is used in CSS Selectors to match the attribute value with a prefix? ANS- ^= 81. Sean is coding an automation Script to launch the web application on a browser window. Which of the following listed option(s) will help Sean to launch the designed application on a web browser in Selenium? ANS- .driver.get(“URL”) , .driver.navigate().to(“URL”) 82. Which date format is used to customize the system date to Year-Month-day format? For example 2019-04-24 ANS- new Simple Date Format(“YYYY-MM-dd”). 83. Select the correct order of execution of annotations, as per the life cycle of Test NG which can be applied for test methods along with before XXXX-after XXXX methods ANS- Before test, Before class, Before method , test , After method, After class , After test . 84. Sam has created a Test NG project with below specified Test class Public class Test class { @Test (Priority = 1) Public void method 1() (-----) @Test Public void method 3() (-----) @Test Public void method 2() (-----) @Test Public void method 4() (-----) }
  • 14. ANS- Method 2 - Method - 3 Method - 1 Method – 4 85. What are the various status options available in the Extent Reports library? ANS- PASS , FAIL , SKIP , FATAL , ERROR , Warning , INFO 86. Sarah wants to perform a few scenarios using a do-while loop in UFT. She has written the below code. Predict the number of times the loop will be executed ? i=10 Do while (i<5) msg box i i=i+1 loop ANS- Does not execution in the condition 87. Predict the Output for the below code snippet Dim Str Str = Str Reverse (mid (“Unified functional testing”,4,9)) Print Str ANS- couf deif 88. Predict the Output for the below code snippet Dim a,b a= ”vbscript” b= Left (Right (a,3) 2) print ANS- ip 89. Which of the following reports can be generated using plugins from Cucumber options? ANS- All of the above
  • 15. 90. James wants to design a scenario in a feature file, in which the complete scenario runs multiple times for different data sets . Suggest James with a Gherkin keyword to activate drop-down testing in the feature file ? ANS- Use Scenario outline. 91. Jack had created the feature file with the below mentioned scenarios as shown below: @smoke Scenario: This is the first scenario @crash Scenario: This is the second scenario In test runner class, Jack mentioned @cucumberoptions (tags=(“smoke”)) predict which scenario is/are gets executed Ans: Execute first scenario 92.Which of the following is the logical container that contains all the elements which drive the performance test? Ans: Load Testing 93. Which of the following assertions is not applied in Jmeter? Ans: web 94. Which of the following is an invalid configuration element in Jmeter? Ans: FTP cookie manager 95. Which of the following input documents is used to create test scenarios and conditions? Ans: Use cases 96. Which of the following Java classes are from the extent API library? Ans: ExtentReports, Status 97. Sean is coding to automate a web application using the webDriver library. He had set the implicit wait of 30 seconds. However, the webelement was found
  • 16. within 10s . Will the webdriver wait for further 20 seconds before executing the next line of code? Ans: Yes, webDriver will wait 20 more seconds. 98. Which method is used in the Apache POI library to fetch the cell value from a row? Identify the correct format of invoking the library functions to get the value from the cell Ans: sheet.getRow(rowno).getcell(col no).getStringCellValue() 99. Sarah is coding to automate script to switch to multiple windows in a web application. She has to store all the window instances in a java variable which is retrived by driver.getWindowHandles(). Suggest sarah with a compatable return type to store the window references. Ans: list <string> 100. Mary is struggling to find a suitable simple wild cart character that matches any single character . Please suggest to her which of the following characters many be relevant to her search Ans: .(wildcard character) 101. Which Gherken keyword is used to create/execute as a common given step for all the scenarios in the feature table? Ans; Background 102. sarah has her code in git local repository, but her team lead had pushed the new changes into the remote repository, Which git command would you recommend Sarah with new changes into her working copy? Ans: put 103. 104. Which parameter types in cucumber expressions matches text without white space? Ans:{ word} 105. Sean is automating a test scenario in which he has to fetch the URL of the webpage using webDriver API. Suggest a method fo Sean to get the link address
  • 17. Ans: getCurrentURL() 106. Ans: No such element Exception 107. Sean is performing verification using assert class functions from TestNG. Suggest him the correct method to verify the reference/address of the two objects to be identical? Ans: assertSame(object1,object2) 108. Sam is designing an automation test where test data is specified in an external excel file. Which command will be helpful to get access to the 2nd sheet of the excel file. Assume web is the writebook object Ans: who.getSheetA1(1) 110. Which of the following is a listener in JMeter? Ans: All the above (Assertion results, Monitor results, Aggregate report) 111. Sarah is coding to automate a scenario for the selection of the “from Cities” drop down box on the flight booking application web page, which class is used? Ans: Select Class 112. Which of the following elements of JMeter helps to validate whether on application is returning on excepted response or not? Ans: Assertion 113. Which controller in JMeter you organize the samples & other logic controllers? Ans: Simple 114. Ans: Once Only 115. Ans: WebElement element 01 = driver.findelement(By.id(“Searchbox”)); 116. Ans: Test Driven Development
  • 18. 117. Trigger all scenarios Ans: Feature file 118. BDD Process Ans: 2-3-1-4-5 119. Selenium Grid (Multiple Box) 120. standard Standard, Text and Bitmap (Active Screen)
  • 19. 1. Sarah is coding in a test scenario, in which she must fetch the booking id as a text message from the span element. The web element looks like <Space> order completed with Booking id:6665<Space> Help Sarah to find a method from the webdriver library to fetch the booking ID? Ans - getText(); 2. James is automating a script and using CSS Selector as a locator. What are the primitive types for designing the CSS selector? ANS - .id, .Attribute, .innerText() (Explanation - There are 5 types of CSS Selectors in Selenium tests- ID, Class, Attribute, Sub-String, Inner Text) 3. Which expression is used in CSS Selectors to match the attribute value with a prefix? ANS- ^= (Explanation - [attr^=value] Represents elements with an attribute name of attr whose value is prefixed (preceded) by value.) 4. Write in correct order. a. Triggers the build b. Open reports to see the latest test results. c. Jenkins checks the Git Repository periodically to detect changes in build project. d. The build is successful / Failure. e. Testers/ Developers commits source code changes to the shared Git Repository. ANS- e,c,a,d,b 5. Kevin has designed a TestClass with the following methods: public class TestClass { @Test public void testMehod1() {int a = 78;} @Test public void testMehod2() {Assert.assertEquals(67, 76);} public void testMehod3() {System.out.println("Welcome");} @Test public void testMehod4(){Assert.assertEquals("Hello”, “Hello");} } Kevin executes the above TestClass as a TestNG test. Which of the following correctly represents the test result? ANS - Total tests run: 3, Passed: 2, Failed: 1
  • 20. 6. Identify the correct way of launching the Chrome browser through WebDriver instance with the correct property. ANS - System.setProperty("webdriver.chrome.driver","src/test/resources /chromedriver.exe"); WebDriver driver = new ChromeDriver(); 7. Samantha wants to write an automation script that determines the count of Hobbies checkboxes. These checkboxes have a name attribute as “hobbies”. Assist Samantha by choosing the correct command. ANS – driver.findElements(By.name(“hobbies”)).size() 8. Henry is designing a script and using CSS Selector as the locator strategy. He must locate the element effectively. The element inspected looks like: <input id=“newPassword” type=“password”> ANS - By.cssSelector("input[id='newPassword']") By.cssSelector("input[id$='Password']") 9. Kevin is automating a test scenario. In which he wants to locate an element with the class attribute “classg1 jkyu_90”. Assist Kevin in setting up the correct locator for the element. ANS - By.className(“classg1”) 10. Select the correct order of execution of annotations, as per the life cycle of the TestNG which can be applied for test methods along with beforeXXXX – afterXXXX methods. ANS - @BeforeTest, @BeforeClass, @BeforeMethod, @Test, @AfterMethod, @AfterClass, @AfterTest 11. Sean is coding an automation script for emulating user actions by mouse actions using webdriver library. Assist Sean to choose the correct syntax to create an object for Actions class from the following options. ANS - Actions act = new Actions(driverinstance) Actions act = new Actions() Actions act = (Actions)driverinstance
  • 21. 12. Kevin is using a CSS Selector as a locator strategy for the following element: <h1 id=“msg01” name=“success”>Registration completed</h1> He must identify the element effectively. ANS – By.cssSelector(“h1[id=‘msg01’]”) By.cssSelector(“h1[id=‘msg01’][name=‘success’]”) 13. Which of the following method causes a thread to pause for a specified duration? pause() 14. What are the features of TestNG? Annotation Based Parallel Testing Reporting 15. __ Closes all the associated windows of webdriver. Quit() 16. Which of the following components identify the artifacts in Maven? Artifact Id Group ID Version 17. What is the correct Syntax to instantiate a Firefox Browser session? WebDriver driver = new FirefoxDriver();
  • 22. 18. Consider there are three frames in a web page, which method below is used to comeback to main window before switching to any frame? switchTo.defaultContent() 19. Which of the following methods will be used to handle an alert dialog box? alert.accept() 20. Which of the given options are structure-based locators? CSS XPATH 21. Which of the following command should be used to extract more than one element on web page? findElements 22. Which of the following is a term used in thee testing of computer software to describe testing done using a table of conditions directly as test data inputs? Data Driven Testing 23. getText() method extracts the text from an element. True 24. Sean is coding to automate a web application using the webDriver library. He had set the implicit wait of 30 seconds. However, the webelement was found within 10s. Will the webdriver wait for further 20 seconds before executing the next line of code? YES , webDriver will wait 20 more seconds. 25. Sarah wants to automate the selection of only one option from a drop-down box as shown below. <html> <body> <select multiple> <option value = “web”> html</option>
  • 23. <option value = “prog”> python</option> <option value = “prog”> java</option> <option value = “prog”> python</option> <option value = “prog”> java</option> </select> </body> </html> Sarah has to select only the fourth option i.e., python from the option list . selectByIndex() 26. Sean is automating a test scenario in which he has to fetch the URL of the webpage using webDriver API. Suggest a method for Sean to get the link address. getCurrentURL() 27. Which method is used in the Apache POI library to fetch the cell value from a row? Identify the correct format of invoking the library functions to get the value from the cell. sheet.getRow(rowno).getcell(col no).getStringCellValue() 28. Match the following tools with the correct description. Tools Description A. GIT 1. A cloud service for remote hosting of git repositories. In addition to hosting your code, the site helps manage software development projects. B. Git Lab 2. Open-Source platform or continuous inspection of code quality to perform automatic review with static analysis of code to detect bugs. C. SonarQube 3. Software that handles source code versioning, letting you make and track local file changes and share with remote repository. A-3, B-1, C-2
  • 24. 29. Sarah is coding an automation script to switch to IFRAME in a web application .Which of the listed options(s) will help Sarah to switch to a particular frame on a web page using the webdriver library? driver.switchTo().frame(int index) driver.switchTo().frame(string nameOrld) driver.switchTo().frame(WebElement frameElement) 30. Sean is coding an automated script to launch the web application on a browser window. Which of the following listed option will help Sean to launch the desired application on a web browser in selenium? driver.get(“URL”) driver.navigate().to(“URL”) 31. Which of the following is correct about generating XML suite file in TestNG for Test Suite Execution? TestNG XML Suite file can be generated at the time of creating a TestNG class. TestNG XML Suite file can be generated using ‘convert to TestNG’ option in Eclipse after a java class is created. 32. Sam is designing an automation test, where test data is specified in an external excel file. Which command will be helpful to get across to the 2nd sheet of excel file? Assume wb is the workbook object. wb.getSheetAt(1) 33. Sarah is coding to automate script to switch to multiple windows in a web application. She has to store all the window instances in a java variable which is retrieved by driver.getWindowHandles(). Suggest Sarah with a compatible return type to store the window references. set <string> 34. When verification fails in TestNG, what forces the test to stop execution and mark as Fail? AssertionError
  • 25. 35. Samantha wants to automate selection of value from a drop-down menu. When the element was Inspected. She found: <html> <body> <select name=”jobrole”> <Option value=”1”>Manager</option > <option value=”2”>Lead</option> <option value=”3”>Analyst</option> </select> </body> <html> Choose “lead” as the test data. Assist her by choosing the correct options. selectByIndex(1); selectByVisibleText(“Lead”) selectByValue(“2”) 36. In distributed version control system for SCM, which of the following is not true? Only online commits are allowed. 37. Which plugin can be used as an IDE(like Eclipse) extension that helps to detect and fix quality issues of code written in java/python/html/JavaScript/php? Sonar Lint 38. Sarah is an Automation Engineer and wants to build a job from Jenkins server. The Jenkins server is up and running. What is the default port number that Sarah needs to remember to access the Jenkins server with URL? 8080 39. Which of the following are supporting attributes for @Test? priority enabled 40. Identify the wait time method which is not the Selenium way to handle synchronization in Test Automation. Sleep() 41. Which of the following library is used for designing the test scripts using the predefined classes, methods, and annotations? TestNG Library
  • 26. 42. Sean is working on a Test Automation project; He is looking for different strategies for identifying the elements/objects from the web application using Selenium locators. Suggest Sean with the available locators in Selenium. By.id() By.tagName() By.partialLinkText() (Explanation – SELENIUM Selectors - ID, Tag Name, Link Text, Name, CSS Selector, Partial Link Text, Class Name, XPath) 43. Which of the following is used to pass data from a source to a particular test method to replace the constant values with variables in TestNG? Data Provider 44. In the TestNG framework, which of the following contains Single/Multiple Test Cases? Test Suite 45. List out the operating systems that are supported by Selenium. Windows, Linux, Mac, android & iOS 46. Sean is filling a web form with his contact details like email, phone number, and address while performing registration to an event. He clicked on submit button without entering the phone number and a pop-up window appeared saying "Contact Number is required". Identify the correct way to handle such pop-up windows using Selenium WebDriver. driver.switchTo().alert() 47. Identify the child tags that are required to add inside dependency tag in order to download the desired libraries/jar from the maven central repository without any errors. groupId version artifactId
  • 27. 48. Sarah is coding an automation script to switch to frame in a web application. Help her to switch a particular frame on a web page using the window library. She wants to interact with the pop-up window and decline the confirmation pop up window show a message “Do you want to cancel the payment?”. Assist Samantha to interact with Driver.SwitchTo().frame(int index) Driver.SwitchTo().frame(String name or id) Driver.switchto().frame(webelement frameelement) 49. Testing an automation script to test a web application. He has to store the Logout link in the using a driver.findElement() method. Suggest Sean with a compatible return to leg out least object. WebElement 50. James wants to automate the selection of ID proofs drop-down box in the web application. He has to verify the drop-down has a selection of more than one option. Which of the following method is suggested to James? isMultiple() 51. Kevin wants to generate extensive report for the test automation project. He decides to use Extent reports library. Which class in this library is used to create labels, code blocks and labels in the report? Markup Helper 52. Sarah is coding an automation script to switch to multiple windows in a web application . She has to store all the window instance in a java variable which is returned by driver.getWindowHandles(). Suggest Sarah with a compatible return type to store the window References. Set<String>
  • 28. 53. Sarah is coding an automation Script to locate a child element in an unordered list. The list is given below: <html> <body> <ul class=”cities”> <li>Bangalore</li> <li>Chennai</li> <li>Hyderabad</li> <li>Mumbai</li> <li>Pune</li> </ul> </body> </html> Sarah wants to locate the 3rd child element i.e., Hyderabad. Suggest the appropriate locator strategy for Sarah. CSS = "ul.cities li:nth-of-type("Hyderabad") 54. Which java Enum is used to handle the keyboard strokes from web driver library? Choose the most appropriate option. Keys 55. There is an element on the web page when inspected on the browser it looks like <div class=”errorMsg”>Error Message</div> James wants to use selenium locators to identify the element. Choose the correct set of commands to locate the element effectively. By.cssSelector(“div.errorMsg”) 56. George is reviewing the quality of the Java code given to him using SonarQube and identified that the variables are named without following java variable naming convention rules. Under which category this issue can be tracked in the tool? Choose the most appropriate option. Minor 57. Sam has created a TestNG project with below specified TestClass. public class TestClass { @Test(priority=1) public void method1() {….} @Test public void method3() {….} @Test
  • 29. public void method2() {….} @Test(priority=2) public void method4() {….} } Predict the test method execution sequence. Choose the most appropriate option. method2, method3, method1, method4 58. What method in the Web driver library is used to get the attribute value of a web element? Choose the appropriate option. getAttribute(“attributeName”) 59. Sean is coding to automate mouse interactions on a web browser. Assist Sean to identify the mouse event specific methods from the below options. Choose the appropriate options. moveToElement() moveByOffset() release() 60. Samantha has designed a TestClass with the following methods: public class TestClass { @BeforeMethod public void method1() {……} @AfterMethod public void method2() {……} @Test(dataProvider=”loginData”) public void method3(String u, String p) {…..} @DataProvider public Object[][] loginData() {….} } Suppose loginData() generates 5 sets of login credentials, how many times method1, method2 and method 3 would be executed ? Choose the appropriate option. Method1 – 5 times, Method2 – 5 times, Method3 – 5 times 61. Identify the correct flow of Jenkins build, when a maven project job in Jenkins is triggered for build. pom.xml >testing.xml- >testing classes>reports
  • 30. 62.Sarah has her code in git local repository, but her team lead had pushed the new changes into the remote repository, which git command would you recommend Sarah with new changes into her working copy? add 63. Mary is struggling to find a suitable simple wild cart character that matches any single character. Please suggest to her which of the following characters many be relevant to her search (?) - single character search (*) - one or more 64. Sean configured his project for the test suite execution using TestNG. He wants to perform parallel execution of the test cases. Which attribute represents the parallel execution of the test cases? parallel="tests" 65. Kevin is designing an automation test, where test data is specified in an external excel file. Which command will be helpful to write the data into a cell of the excel file? Assume c1 is the cell object. c1.setCellValue("data") 66. Which of the following Java classes are from the Extent API library? ExtentReports Status 67. Which date format is used to customize the system data to year- month-day format? new SimpleDateFormat(“yyyy-MM-dd”) 68. Fuller has written an automation script using selenium webdriver commands. He has used all the necessary and appropriate locators for interacting with the web elements. When he executed the script the web driver was not able to locate an element resulting in the test script failure. Which error/ exception is thrown by webdriver? NoSuchElementException 69. What are the various status options available in the Extent reports library? PASS,FAIL,SKIP,FATAL,ERROR,WARNING,INFO
  • 31. 70. Kevin wants to fetch all the data from the country drop down menu and verify the data against data from the database. He is looking into the library for a method to fetch all the data from the country drop down box. Which method will help Kevin? getOptions() 71. Samantha has to execute automation scripts across multiple platforms like windows, mac, Linux which tool in the selenium suite will be used by Samantha? Choose the most appropriate option. selenium RC 72. The web element looks like <a href=”icart.jsp? params”>cart[19]</a>. Which locator is most recommended for the scan to identify the cart web element for all test iterations ? By.partialLinkText() 73. Kevin is planning to write automation script for below scenario. Given the user is on the payment page. He views a textbox with attribute values . “Enter Mobile Number” written in the box. The user must enter the mobile number in the box to proceed. Please choose the correct command to help Kevin in automating the scenario. Assume the textbox element is already identified and stored in mobile txt box variable. mobileTxtBox.clear(); mobileTxtBox.sendKeys(“xxxxxxxxxx”); 74. Which MS office component(s) can be handled by Apache POI Library? XLSX 75. Sarah is coding to automate a scenario for the selection of the “from Cities” drop down box IN the flight booking application web page, which WebDriver library class helps Sarah to automate the drop-down box with different functions? Select Class 76. Sean is performing verification using assert class functions from TestNG. Suggest him the correct method to verify the reference/address of the two objects to be identical? assertSame(object1,object2)
  • 32. 77. Samantha has to execute automation scripts across multiple platforms like windows, max and Linux. Which tool in the Selenium suite will be useful for Samantha? Selenium Grid 78. Sean wants to switch to multiple frames on a web page when an operation is completed on a frame and test flow needs to move to another frame. Calling the driver.switchTo().frame() immediately will not move the context to next frame, which is at the same level in DOM. The test will first need to switch to the main document and then activate the frame. Which method is used to switch back to the main document from the frame? switchTo.defaultContent() 79. Samantha is automating a test scenario. This scenario involves a pop-up of confirmation window. She wants to interact with the pop- up window and decline the confirmation. Pop-up window shows a message “Do you want to cancel the payment?” Driver.switchTo().alert().dismiss() 80. Sarah is coding an automation script, where she has to validate the price of the holiday package based on the drag & drop of island city from the menu. The price is fetched from the server and displays without reloading the web page. Which WebDriver library class has the predefined conditions for handling dynamic waits in selenium WebDriver Library? WebDriverWait 81. While using Soft Assertion in the Test Class, James must specify a method, that will collate and display the assertion results. assertAll() 82. Which java interface is used to capture screenshot of web page using Web Driver API? TakesScreenshot 83. Consider the below HTML code snippet. Email ; <label id= “Email” class= “style1” name= “input”> Which is the best locator to identify the email web element? By.xpath(“//label[@id= ‘email’]”)
  • 33. 1. Sarah is coding in a test scenario, in which she must fetch the booking id as a text message from the span element. The web element looks like <Space> order completed with Booking id:6665<Space> Help Sarah to find a method from the webdriver library to fetch the booking ID? Ans - getText(); 2. James is automating a script and using CSS Selector as a locator. What are the primitive types for designing the CSS selector? ANS - .id, .Attribute, .innerText() (Explanation - There are 5 types of CSS Selectors in Selenium tests ID, Class, Attribute, Sub-String, Inner Text) 3. Which expression is used in CSS Selectors to match the attribute value with a prefix? ANS- ^= (Explanation - [attr^=value] Represents elements with an attribute name of attr whose value is prefixed (preceded) by value.) 4. Write in correct order. a. Triggers the build b. Open reports to see the latest test results. c. Jenkins checks the Git Repository periodically to detect changes in build project. d. The build is successful / Failure. e. Testers/ Developers commits source code changes to the shared Git Repository. ANS- e,c,a,d,b 5. Kevin has designed a TestClass with the following methods: public class TestClass { @Test public void testMehod1() {int a = 78;} @Test public void testMehod2() {Assert.assertEquals(67, 76);} public void testMehod3() {System.out.println("Welcome");} @Test public void testMehod4(){Assert.assertEquals("Hello”, “Hello");} } Kevin executes the above TestClass as a TestNG test. Which of the following correctly represents the test result?
  • 34. ANS - Total tests run: 3, Passed: 2, Failed: 1 6. Identify the correct way of launching the Chrome browser through WebDriver instance with the correct property. ANS - System.setProperty("webdriver.chrome.driver","src/test/resources /chromedriver.exe"); WebDriver driver = new ChromeDriver(); 7. Samantha wants to write an automation script that determines the count of Hobbies checkboxes. These checkboxes have a name attribute as “hobbies”. Assist Samantha by choosing the correct command. ANS – driver.findElements(By.name(“hobbies”)).size() 8. Henry is designing a script and using CSS Selector as the locator strategy. He must locate the element effectively. The element inspected looks like: <input id=“newPassword” type=“password”> ANS - By.cssSelector("input[id='newPassword']") By.cssSelector("input[id$='Password']") 9. Kevin is automating a test scenario. In which he wants to locate an element with the class attribute “classg1 jkyu_90”. Assist Kevin in setting up the correct locator for the element. ANS - By.className(“classg1”) 10. Select the correct order of execution of annotations, as per the life cycle of the TestNG which can be applied for test methods along with beforeXXXX – afterXXXX methods. ANS - @BeforeTest, @BeforeClass, @BeforeMethod, @Test, @AfterMethod, @AfterClass, @AfterTest 11. Sean is coding an automation script for emulating user actions by mouse actions using webdriver library. Assist Sean to choose the correct syntax to create an object for Actions class from the following options. ANS - Actions act = new Actions(driverinstance) Actions act = new Actions() Actions act = (Actions)driverinstance
  • 35. 12. Kevin is using a CSS Selector as a locator strategy for the following element: <h1 id=“msg01” name=“success”>Registration completed</h1> He must identify the element effectively. ANS – By.cssSelector(“h1[id=‘msg01’]”) By.cssSelector(“h1[id=‘msg01’][name=‘success’]”) 13. Which of the following method causes a thread to pause for a specified duration? pause() 14. What are the features of TestNG? Annotation Based Parallel Testing Reporting 15. __ Closes all the associated windows of webdriver. Quit() 16. Which of the following components identify the artifacts in Maven? Artifact Id Group ID Version 17. What is the correct Syntax to instantiate a Firefox Browser session? WebDriver driver = new FirefoxDriver(); 18. Consider there are three frames in a web page, which method below is used to comeback to main window before switching to any frame? switchTo.defaultContent() 19. Which of the following methods will be used to handle an alert
  • 36. dialog box? alert.accept() 20. Which of the given options are structure-based locators? CSS XPATH 21. Which of the following command should be used to extract more than one element on web page? findElements 22. Which of the following is a term used in thee testing of computer software to describe testing done using a table of conditions directly as test data inputs? Data Driven Testing 23. getText() method extracts the text from an element. True 24. Sean is coding to automate a web application using the webDriver library. He had set the implicit wait of 30 seconds. However, the webelement was found within 10s. Will the webdriver wait for further 20 seconds before executing the next line of code? YES , webDriver will wait 20 more seconds. 25. Sarah wants to automate the selection of only one option from a drop-down box as shown below. <html> <body> <select multiple> <option value = “web”> html</option> <option value = “prog”> python</option> <option value = “prog”> java</option> <option value = “prog”> python</option> <option value = “prog”> java</option> </select> </body>
  • 37. </html> Sarah has to select only the fourth option i.e., python from the option list . selectByIndex() 26. Sean is automating a test scenario in which he has to fetch the URL of the webpage using webDriver API. Suggest a method for Sean to get the link address. getCurrentURL() 27. Which method is used in the Apache POI library to fetch the cell value from a row? Identify the correct format of invoking the library functions to get the value from the cell. sheet.getRow(rowno).getcell(col no).getStringCellValue() 28. Match the following tools with the correct description. Tools Description A. GIT 1. A cloud service for remote hosting of git repositories. In addition to hosting your code, the site helps manage software development projects. B. Git Lab 2. Open-Source platform or continuous inspection of code quality to perform automatic review with static analysis of code to detect bugs. C. SonarQube 3. Software that handles source code versioning, letting you make and track local file changes and share with remote repository. A-3, B-1, C-2 29. Sarah is coding an automation script to switch to IFRAME in a web application .Which of the listed options(s) will help Sarah to switch to a particular frame on a web page using the webdriver library?
  • 38. driver.switchTo().frame(int index) driver.switchTo().frame(string nameOrld) driver.switchTo().frame(WebElement frameElement) 30. Sean is coding an automated script to launch the web application on a browser window. Which of the following listed option will help Sean to launch the desired application on a web browser in selenium? driver.get(“URL”) driver.navigate().to(“URL”) 31. Which of the following is correct about generating XML suite file in TestNG for Test Suite Execution? TestNG XML Suite file can be generated at the time of creating a TestNG class. TestNG XML Suite file can be generated using ‘convert to TestNG’ option in Eclipse after a java class is created. 32. Sam is designing an automation test, where test data is specified in an external excel file. Which command will be helpful to get across to the 2nd sheet of excel file? Assume wb is the workbook object. wb.getSheetAt(1) 33. Sarah is coding to automate script to switch to multiple windows in a web application. She has to store all the window instances in a java variable which is retrieved by driver.getWindowHandles(). Suggest Sarah with a compatible return type to store the window references. set <string> 34. When verification fails in TestNG, what forces the test to stop execution and mark as Fail? AssertionError 35. Samantha wants to automate selection of value from a drop-down menu. When the element was Inspected. She found: <html> <body> <select name=”jobrole”> <Option value=”1”>Manager</option > <option value=”2”>Lead</option> <option value=”3”>Analyst</option> </select>
  • 39. </body> <html> Choose “lead” as the test data. Assist her by choosing the correct options. selectByIndex(1); selectByVisibleText(“Lead”) selectByValue(“2”) 36. In distributed version control system for SCM, which of the following is not true? Only online commits are allowed. 37. Which plugin can be used as an IDE(like Eclipse) extension that helps to detect and fix quality issues of code written in java/python/html/JavaScript/php? Sonar Lint 38. Sarah is an Automation Engineer and wants to build a job from Jenkins server. The Jenkins server is up and running. What is the default port number that Sarah needs to remember to access the Jenkins server with URL? 8080 39. Which of the following are supporting attributes for @Test? priority enabled 40. Identify the wait time method which is not the Selenium way to handle synchronization in Test Automation. Sleep() 41. Which of the following library is used for designing the test scripts using the predefined classes, methods, and annotations? TestNG Library 42. Sean is working on a Test Automation project; He is looking for different strategies for identifying the elements/objects from the web application using Selenium locators. Suggest Sean with the available locators in Selenium. By.id() By.tagName() By.partialLinkText() (Explanation – SELENIUM Selectors - ID, Tag Name, Link Text,
  • 40. Name, CSS Selector, Partial Link Text, Class Name, XPath) 43. Which of the following is used to pass data from a source to a particular test method to replace the constant values with variables in TestNG? Data Provider 44. In the TestNG framework, which of the following contains Single/Multiple Test Cases? Test Suite 45. List out the operating systems that are supported by Selenium. Windows, Linux, Mac, android & iOS 46. Sean is filling a web form with his contact details like email, phone number, and address while performing registration to an event. He clicked on submit button without entering the phone number and a pop-up window appeared saying "Contact Number is required". Identify the correct way to handle such pop-up windows using Selenium WebDriver. driver.switchTo().alert() 47. Identify the child tags that are required to add inside dependency tag in order to download the desired libraries/jar from the maven central repository without any errors. groupId version artifactId 48. Sarah is coding an automation script to switch to frame in a web application. Help her to switch a particular frame on a web page using the window library. She wants to interact with the pop-up window and decline the confirmation pop up window show a message “Do you want to cancel the payment?”. Assist Samantha to interact with Driver.SwitchTo().frame(int index) Driver.SwitchTo().frame(String name or id) Driver.switchto().frame(webelement frameelement) 49. Testing an automation script to test a web application. He has to store the Logout link in the using a driver.findElement() method. Suggest Sean with a compatible return to leg out least object. WebElement
  • 41. 50. James wants to automate the selection of ID proofs drop-down box in the web application. He has to verify the drop-down has a selection of more than one option. Which of the following method is suggested to James? isMultiple() 51. Kevin wants to generate extensive report for the test automation project. He decides to use Extent reports library. Which class in this library is used to create labels, code blocks and labels in the report? Markup Helper 52. Sarah is coding an automation script to switch to multiple windows in a web application . She has to store all the window instance in a java variable which is returned by driver.getWindowHandles(). Suggest Sarah with a compatible return type to store the window References. Set<String> 53. Sarah is coding an automation Script to locate a child element in an unordered list. The list is given below: <html> <body> <ul class=”cities”> <li>Bangalore</li> <li>Chennai</li> <li>Hyderabad</li> <li>Mumbai</li> <li>Pune</li> </ul> </body> </html> Sarah wants to locate the 3rd child element i.e., Hyderabad. Suggest the appropriate locator strategy for Sarah. CSS = "ul.cities li:nth-of-type("Hyderabad") 54. Which java Enum is used to handle the keyboard strokes from web driver library? Choose the most appropriate option. Keys 55. There is an element on the web page when inspected on the browser it looks like <div class=”errorMsg”>Error Message</div>
  • 42. James wants to use selenium locators to identify the element. Choose the correct set of commands to locate the element effectively. By.cssSelector(“div.errorMsg”) 56. George is reviewing the quality of the Java code given to him using SonarQube and identified that the variables are named without following java variable naming convention rules. Under which category this issue can be tracked in the tool? Choose the most appropriate option. Minor 57. Sam has created a TestNG project with below specified TestClass. public class TestClass { @Test(priority=1) public void method1() {….} @Test public void method3() {….} @Test public void method2() {….} @Test(priority=2) public void method4() {….} } Predict the test method execution sequence. Choose the most appropriate option. method2, method3, method1, method4 58. What method in the Web driver library is used to get the attribute value of a web element? Choose the appropriate option. getAttribute(“attributeName”) 59. Sean is coding to automate mouse interactions on a web browser. Assist Sean to identify the mouse event specific methods from the below options. Choose the appropriate options. moveToElement() moveByOffset() release() 60. Samantha has designed a TestClass with the following methods: public class TestClass {
  • 43. @BeforeMethod public void method1() {……} @AfterMethod public void method2() {……} @Test(dataProvider=”loginData”) public void method3(String u, String p) {…..} @DataProvider public Object[][] loginData() {….} } Suppose loginData() generates 5 sets of login credentials, how many times method1, method2 and method 3 would be executed ? Choose the appropriate option. Method1 – 5 times, Method2 – 5 times, Method3 – 5 times 61. Identify the correct flow of Jenkins build, when a maven project job in Jenkins is triggered for build. pom.xml >testing.xml- >testing classes>reports 62.Sarah has her code in git local repository, but her team lead had pushed the new changes into the remote repository, which git command would you recommend Sarah with new changes into her working copy? add 63. Mary is struggling to find a suitable simple wild cart character that matches any single character. Please suggest to her which of the following characters many be relevant to her search (?) - single character search (*) - one or more 64. Sean configured his project for the test suite execution using TestNG. He wants to perform parallel execution of the test cases. Which attribute represents the parallel execution of the test cases? parallel="tests" 65. Kevin is designing an automation test, where test data is specified in an external excel file. Which command will be helpful to write the data into a cell of the excel file? Assume c1 is the cell object. c1.setCellValue("data") 66. Which of the following Java classes are from the Extent API library? ExtentReports Status
  • 44. 67. Which date format is used to customize the system data to year month-day format? new SimpleDateFormat(“yyyy-MM-dd”) 68. Fuller has written an automation script using selenium webdriver commands. He has used all the necessary and appropriate locators for interacting with the web elements. When he executed the script the web driver was not able to locate an element resulting in the test script failure. Which error/ exception is thrown by webdriver? NoSuchElementException 69. What are the various status options available in the Extent reports library? PASS,FAIL,SKIP,FATAL,ERROR,WARNING,INFO 70. Kevin wants to fetch all the data from the country drop down menu and verify the data against data from the database. He is looking into the library for a method to fetch all the data from the country drop down box. Which method will help Kevin? getOptions() 71. Samantha has to execute automation scripts across multiple platforms like windows, mac, Linux which tool in the selenium suite will be used by Samantha? Choose the most appropriate option. selenium RC 72. The web element looks like <a href=”icart.jsp? params”>cart[19]</a>. Which locator is most recommended for the scan to identify the cart web element for all test iterations ? By.partialLinkText() 73. Kevin is planning to write automation script for below scenario. Given the user is on the payment page. He views a textbox with attribute values . “Enter Mobile Number” written in the box. The user must enter the mobile number in the box to proceed. Please choose the correct command to help Kevin in automating the scenario. Assume the textbox element is already identified and stored in mobile txt box variable. mobileTxtBox.clear(); mobileTxtBox.sendKeys(“xxxxxxxxxx”); 74. Which MS office component(s) can be handled by Apache POI
  • 45. Library? XLSX 75. Sarah is coding to automate a scenario for the selection of the “from Cities” drop down box IN the flight booking application web page, which WebDriver library class helps Sarah to automate the drop-down box with different functions? Select Class 76. Sean is performing verification using assert class functions from TestNG. Suggest him the correct method to verify the reference/address of the two objects to be identical? assertSame(object1,object2) 77. Samantha has to execute automation scripts across multiple platforms like windows, max and Linux. Which tool in the Selenium suite will be useful for Samantha? Selenium Grid 78. Sean wants to switch to multiple frames on a web page when an operation is completed on a frame and test flow needs to move to another frame. Calling the driver.switchTo().frame() immediately will not move the context to next frame, which is at the same level in DOM. The test will first need to switch to the main document and then activate the frame. Which method is used to switch back to the main document from the frame? switchTo.defaultContent() 79. Samantha is automating a test scenario. This scenario involves a pop-up of confirmation window. She wants to interact with the pop up window and decline the confirmation. Pop-up window shows a message “Do you want to cancel the payment?” Driver.switchTo().alert().dismiss() 80. Sarah is coding an automation script, where she has to validate the price of the holiday package based on the drag & drop of island city from the menu. The price is fetched from the server and displays without reloading the web page. Which WebDriver library class has the predefined conditions for handling dynamic waits in selenium WebDriver Library? WebDriverWait 81. While using Soft Assertion in the Test Class, James must specify a
  • 46. method, that will collate and display the assertion results. assertAll() 82. Which java interface is used to capture screenshot of web page using Web Driver API? TakesScreenshot 83. Consider the below HTML code snippet. Email ; <label id= “Email” class= “style1” name= “input”> Which is the best locator to identify the email web element? By.xpath(“//label[@id= ‘email’]”) SELENIUM 1. Sean is coding to automate a web application using the webDriver library. He had set the implicit wait of 30 seconds. However, the webelement was found within 10s. Will the webdriver wait for further 20 seconds before executing the next line of code? Ans: No, webDriver won’t wait 20 more seconds. 2. Which method is used in the Apache POI library to fetch the cell value from a row? Identify the correct format of invoking the library functions to get the value from the cell Ans: sheet.getRow(rowno).getcell(col no).getStringCellValue() 3. Sarah is coding to automate script to switch to multiple windows in a web application. She has to store all the window instances in a java variable which is retrived by driver.getWindowHandles(). Suggest sarah with a compatable return type to store the window references. Ans:Set <string> 4. sarah has her code in git local repository, but her team lead had pushed the new changes into the remote repository, Which git command would you recommend Sarah with new changes into her working copy? Ans: add 5. Sean is automating a test scenario in which he has to fetch the URL of the webpage using webDriver API. Suggest a method fo Sean to get the link address Ans: getCurrentURL() 6. Mary is struggling to find a suitable simple wild cart character that matches any single character. Please suggest to her which of the following characters many be relevant to her search Ans: (?) – single character search (*) – one or more
  • 47. 1) Which of the following is correct about generating XML suite file in testNG for Test Suite Execution a TestNG XML Suite file can be generated at the time of creating a TestNG class. b TestNG XML Suite file can be generated using ‘convert to TestNG’ option in Eclipse after a java class is created. c TestNG XML Suite file can be automatically generated when user creates a maven java project d There is no option in Eclipse to generate XML Suite file e TestNG XML Suite file can be generated by Jenkins plugin 2) Sean is coding an automated script to launch the web application on a browser window. Which of the following listed option will help Sean to launch the desired application on a web browser in selenium? a driver.get(“url”) b driver.navigate().to(“URL”) c driver.navigate(“URL”) d driver.getUrl(“URL”) e driver.setUrl(“URL”) 3) Sam is designing an automation test, where test data is specified in an external excel file. Which command will be helpful to get across to the 2nd sheet of excel file. Assume wb is the workbook object. a wb.getSheetAt(1) b wb.getSheetAt(2) c wb.getSheet(1) d wb.getSheet(2) 4)Sean configured his project for the test suite execution using TestNG. He wants to perform parallel execution of the test cases. Which attribute represents the parallel execution of the test cases? a parallel = “methods” b parallel="tests" c parallel = “test-classes”
  • 48. d parallel =”test-cases” 5) Kevin is designing an automation test, where test data is specified in an external excel file. Which command will be helpful to write the data into a cell of the excel file? Assume c1 is the cell object. a c1.setCellValue("data") b c1.setValue(“data”) c c1.writeCellValue(“data”) d c1.setCellData(“data”) 6) Sarah wants to automate the selection of only one option from a drop-down box as shown below. <html> <body> <select multiple> <option value = “web”> html</option> <option value = “prog”> python</option> <option value = “prog”> java</option> <option value = “prog”> python</option> <option value = “prog”> java</option> </select> </body> </html> Sarah has to select only the fourth option i.e. python from the option list . a selectByVisibleText() b selectByValue() c selectByIndex() d All of the above DDT Sam is designing an automation test, where test data is specified in an external excel file. Which command will be helpful to get access to the 2nd sheet of the excel file. Assume wb Is the workbook
  • 49. object wb.getSheetAt(1) wb.getSheetAt(2) wb.getSheet(1) wb.getSheet(1) EXTENT REPORTS Which of the following Java classes are from the Extent API library? ExtentReports Status TakesScreenshot Actions SWITCHING TO WINDOWS Which of the following methods is used to close all the opened windows of WebDriver Instance? Close() Quit() Null() Sleep() ACTIONS Sean is coding an automation script for emulating user actions by mouse using the webdriver library. Assist Sean to choose correct syntax to create an object for actions class from the following options Actions act = new Actions(driverInstance) Actions act = new Actions() New Actions(driverInstance) Actions act = (Actions)driverInstance Actions.callMethods()
  • 50. EXTENT REPORTS Which date format is used to customize the system data to year-month-day format? new SimpleDateFormat(“yyyy-mm-dd”) new SimpleDateFormat(“yyyy-MM-dd”) new SimpleDateFormat(“yyyy-month-dd”) new SimpleDateFormat(“yyyy-mmm-dd”) WEBDRIVER API Fuller has written an automation script using selenium webdriver commands. He has used all the necessary and appropriate locators for interacting with the web elements. When he executed the script the web driver was not able to locate an element resulting in the test script failure. Which error/ exception is thrown by webdriver? NoSuchElementException NoSuchElementError NullPointerException ObjectNotFoundException Cannot predict the name of error/ exception WEBDRIVER API Samantha wants to automate selection of value from a drop down menu. When the element was Inspected. She foundAgain <html> <body> <select name=”jobrole”> <Option value=”1”>Manager</option > <option value=”2”>Lead</option> <option value=”3”>Analyst</option> </select> </body>
  • 51. <html> Choose “lead” as the test data. Assist her by choosing the correct options. selectByIndex(1) selectByValue(2) selectByVisibleText(“Lead”) selectByValue(“2”) Q1- Which expression is used in CSS selectors to match the attribute value with a prefix? Ans: ^ Q2- public class TestClass { @Test(priority=1) public void method1(){...} @Test public void method3(){...} @Test public void method2(){...} @Test(priority=2) public void method4(){...} } Ans: method2,method3,method1,method4 1. Which java enum is used to handle the keyboard strokes from webdriver library? a. Actions b. Keyboard c. Keys d. Keyword
  • 52. 2. Sam is designing an automation test, where test data is specified in an external excelfile. Which command will be helpful to get access to the 2nd sheet of the excel file. Assume wb is workbook object. a. wb.getSheetAt(1) b. wb.getSheetAt(2) c. wb.getSheet(1) d. wb.getSheet(2) 3. sarah wants to automate the selection of only one option from a drop down box as shown below <html> <body> <select multiple> <option value=”web”>html</option> <option value=”prog”>python</option> <option value=”prog”>java</option> <option value=”prog”>python</option> <option value=”prog”>java</option> </select> </body> </html> Sarah has to select only the fourth option that is python from the options list a. selectByVisibleText() b. selectByValue () c. selectByIndex() d. all the above 4. What are the various status options available in the Extent reports library? a. PASS,FAIL,SKIP,FATAL,ERROR,WARNING,INFO b. SUCCESS,FAIL,SKIP ,ERROR,WARNING,INFO c. DONE,DEBUG,FAIL,SKIP,ERROR,WARNING,INFO d. ABORT,PASS,FAIL,DONE,ERROR,WARNING,INFO 5. Sean is automating a test scenario, in which he has to fetch the URL of the web page using WebDriver API . Suggest a method for Sean to get the link address. a. getURL() b. get() c. getCurrentURL() d. getURL() 6. Kevin wants to fetch all the data from the country drop down menu and verify the data against data from the database. He is looking into the library for a method to fetch all the data from the country drop down box. Which method will help Kevin? a. selectAllOptions() b. getOptions() c. getAllOptions() d. getData() e. getText() 7. QUESTION NOT VISIBLE , multiple options
  • 53. a. driver.get(“URL”) b. driver.navigate().to(“URL”) c. driver.navigate(“URL”) d. driver.getUrl(“URL”) e. driver.setUrl(“URL”) f. Sarah is coding in a test scenario, in which she must fetch the booking id as a text message from the span element. The web element looks like <Space> order completed with Booking id:6665<Space> Help Sarah to find a method from the webdriver library to fetch the booking ID? Ans - getText(); g. James is automating a script and using CSS Selector as a locator. What are the primitive types for designing the CSS selector? ANS - .id, .Attribute, .innerText() (Explanation - There are 5 types of CSS Selectors in Selenium tests ID, Class, Attribute, Sub-String, Inner Text) h. Which expression is used in CSS Selectors to match the attribute value with a prefix? ANS- ^= (Explanation - [attr^=value] Represents elements with an attribute name of attr whose value is prefixed (preceded) by value.) i. Write in correct order. a. Triggers the build b. Open reports to see the latest test results. c. Jenkins checks the Git Repository periodically to detect changes in build project. d. The build is successful / Failure. e. Testers/ Developers commits source code changes to the shared Git Repository. ANS- e,c,a,b,d j. Kevin has designed a TestClass with the following methods: public class TestClass { @Test public void testMehod1() {int a = 78;} @Test public void testMehod2() {Assert.assertEquals(67, 76);} public void testMehod3() {System.out.println("Welcome");} @Test public void testMehod4(){Assert.assertEquals("Hello”, “Hello");} } Kevin executes the above TestClass as a TestNG test. Which of the following correctly represents the test result? ANS - Total tests run: 3, Passed: 2, Failed: 1 k. Identify the correct way of launching the Chrome browser through WebDriver instance with the correct property. ANS - System.setProperty("webdriver.chrome.driver","src/test/resources/chromedriver.exe ");
  • 54. WebDriver driver = new ChromeDriver(); l. Samantha wants to write an automation script that determines the count of Hobbies checkboxes. These checkboxes have a name attribute as “hobbies”. Assist Samantha by choosing the correct command. ANS – driver.findElements(By.name(“hobbies”)).size() m. Henry is designing a script and using CSS Selector as the locator strategy. He must locate the element effectively. The element inspected looks like: <input id=“newPassword” type=“password”> ANS - By.cssSelector("input[id='newPassword']") n. Kevin is automating a test scenario. In which he wants to locate an element with the class attribute “classg1 jkyu_90”. Assist Kevin in setting up the correct locator for the element. ANS - By.className(“classg1”) o. Select the correct order of execution of annotations, as per the life cycle of the TestNG which can be applied for test methods along with beforeXXXX – afterXXXX methods. ANS - @BeforeTest, @BeforeClass, @BeforeMethod, @Test, @AfterMethod, @AfterClass, @AfterTest p. Sean is coding an automation script for emulating user actions by mouse actions using webdriver library. Assist Sean to choose the correct syntax to create an object for Actions class from the following options. ANS - Actions act = new Actions(driverinstance) Actions act = new Actions() Actions act = (Actions)driverinstance q. Kevin is using a CSS Selector as a locator strategy for the following element: <h1 id=“msg01” name=“success”>Registration completed</h1> He must identify the element effectively. ANS – By.cssSelector(“h1[id=‘msg01’]”) By.cssSelector(“h1[id=‘msg01’][name=‘success’]”) 89. Which of the following reports can be generated using plugins from Cucumber options? ANS- All of the above Correct 90. James wants to design a scenario in a feature file, in which the complete scenario runs multiple
  • 55. times for different data sets . Suggest James with a Gherkin keyword to activate drop-down testing in the feature file ? ANS- Use Scenario outline. Correct 91. Jack had created the feature file with the below mentioned scenarios as shown below: @smoke Scenario: This is the first scenario @crash Scenario: This is the second scenario In test runner class, Jack mentioned @cucumberoptions (tags=(“smoke”)) predict which scenario is/are gets executed Ans: Execute first scenario Correct 92.Which of the following is the logical container that contains all the elements which drive the performance test? Ans: Load Testing Correct But, If Test Plan Available in option, Then, the correct Ans will be Test Plan. 93. Which of the following assertions is not applied in Jmeter? Ans: web Correct 94. Which of the following is an invalid configuration element in Jmeter? Ans: FTP cookie manager Correct 95. Which of the following input documents is used to create test scenarios and conditions? Ans: Use cases Correct 96. Which of the following Java classes are from the extent API library? Ans: ExtentReports, Status Correct Google: ExtentReports 97. Sean is coding to automate a web application using the webDriver library. He had set the implicit wait of 30 seconds. However, the webelement was found / Test Plan correct correct correct Google : ExtentReports correct within 10s . Will the webdriver wait for further 20 seconds before executing the next line of code? Ans: Yes, webDriver will wait 20 more seconds. Correct 1) Which java enum is used to handle the keyboard strokes from webdriver library? (a) Actions (b) Keyboard (c) Keys (d) Keyword
  • 56. Ans: (b) keyboard 2) Which expression is used in CSS selectors to match attribute value with a prefix? (a)$= (b)^= (c)*= (d)none Ans: (b) ^= 3) Samantha wants to automate selection of valur from a drop….. <html> <body> <select name=”jobrole”> <option value=”1”>Manager</option> <option value=”2”>Lead</option> <option value=”3”>Analyst</option> </select> </body> </html> Ans: SelectByVisibleText(“Lead”) SelectByValue(“2) 4) Sarah is coding an automation script to switch to IFRAME in a web application .Which of the listed options(s) will help sarah to switch to a particular frame on a web page using the webdriver library? (a )driver.switchTo().frame(int index) (b) driver.switchTo().frame(string nameOrld) ( c) driver.switchTo().frame(WebElement frameElement) (d)driver.switchTo().frame() (e) driver.switchTo().frame(String name) ANS: (a) , (b), (c) 5)Which Ms office components(s) can be handled by apache POI library? (a)ppt (b)docs (c)… (d)… (e)all the above
  • 57. Ans: POIFS 6)Samanta has designed a testclass, with the…. Public class testclass { @beforeMethod Public void method1() {…} @afterMethod Public void method2() {…} @Test(dataProvider=”loginData”) Public void method2(string u, string p) {…} @data provider Public object[][] login data() {…} Suppose login data () generates 5 sets og login credentials ….. Choose right answer. ANS: Method1 – 5 times……. ****7) which method is used in apache poi library to fetch the cell value from a row? identify the format of invoking the library functions to get value from a cell (a)sheet.getStringCellValue() (b) sheet.get(rowno).getstringCellvalue() (c) sheet.getCell(collno) .getstringCellvalue() (d) sheet.get(rowno).getCell(colon).getstringCellvalue() Ans : (c)
  • 58. 1. Samantha has to execute automation scripts across multiple platforms like windows, mac, Linux which tool in the selenium suite will be used by Samantha? Choose the most appropriate option. Ans selenium RC 2. George is reviewing the quality of the java code given to him using SonarQube and described that the variables are named without following java variables naming convention. Under which category this issue can be tracked in the tool? Choose the most appropriate option. Ans minor 3. Identify the correct flow of jenkins build, when a maven project job in Jenkins is triggered for build Ans testing.xml->pom.xml>testing classes>reports 4. Sarah is coding to automate a scenario for the selection of the “from Cities” drop down box on the flight booking application web page, which class is used? Ans Select Class 5. Sarah is coding in a test scenario, in which she must fetch the booking id as a text message from the span element The web element looks like <Space> order completed with Booking id:6665<Space> Help Sarah to find a method from the webdriver library to fetch the booking ID? Ans get Text(); 6. Which expression is used in CSS Selectors to match the attribute value with a prefix? Ans ^= 1. Samantha has designed a TestClass with the following methods: public class TestClass { @BeforeMethod public void method1() {……} @AfterMethod public void method2() {……} @Test(dataProvider=”loginData”) public void method3(String u, String p) {…..} @DataProvider public Object[][] loginData() {….} } Suppose loginData() generates 5 sets of login credentials, how many times method1, method2 and method 3 would be executed ? Choose the appropriate option
  • 59. a) Method1 – 5 times, Method2 – 5 times, Method3 – 5 times b) Method1 – 1 time, Method2 – 1 time, Method3 – 5 times c) Method1 – 1 time, Method2 – 1 time, Method3 – 1 time d) Cannot predict the iterations 2. Sarah is coding an automation script to switch to iFRAME in a web application. Which of the listed options will help Sarah to switch to a particular frame on a web page using the webdriver library? Choose the appropriate options. a) driver.switchTo().frame(int index) b) driver.switchTo().frame(String name Or id) c) driver.switchTo().frame(WebElement frameElement) d) driver.switchTo().frame() e) driver.switchTo().iframe(String name) 3. Sean is coding to automate mouse interactions on a web browser. Assist Sean to identify the mouse event specific methods from the below options. Choose the appropriate options. a) moveToElement() b) moveByOffset() c) release() d) keyUp() e) keyDown() f) sendKeys() 4. What method in the Web driver library is used to get the attribute value of a web element? Choose the appropriate option. a) getAttributeValue(“attributeName”) b) getAttribute(“attributeName”) c) getValue(“attributeName”) d) getText() 5. Sam has created a TestNG project with below specified TestClass. public class TestClass {
  • 60. @Test(priority=1) public void method1() {….} @Test public void method3() {….} @Test public void method2() {….} @Test(priority=2) public void method4() {….} } Predict the test method execution sequence. Choose the most appropriate option. a) method2, method3, method1, method4 b) method1, method4, method3, method2 c) method1, method4, method2, method3 d) Random order of execution 6. Sarah is coding to automate a test scenario in which she must fetch the booking id as a text message from the span element. The web element looks like: <span>Order Completed With Booking ID:6665</span> Help Sarah to find a method from the WebDriver Library to fetch the Booking ID. Choose the most appropriate option. a) getValue() b) getID() c) getText() d) getTagName() 7. George is reviewing the quality of the Java code given to him using SonarQube and identified that the variables are named without following java variable naming convention rules. Under which category this issue can be tracked in the tool? Choose the most appropriate option. a) Info b) Minor c) Major d) Critical e) Sarah as an automation engineer triggers a new build from Jenkins as a maven project having source codes in git repository which of the following tools/ Software are required to be configured by Sarah in Jenkins to make the build success. Ans: jre , jdk ,meavon f) Henry is designing a script and using css selector as the locator strategy. He must locate the element effectively. The element inspected looks like <input id =”new Password” type =”password”> Choose the most appropriate option.
  • 61. ans: By.CssSelector(“input[id=’password’]”) g) There is an element on the web page when inspected on the browser it looks like <div class=”errorMsg”>Error Message</div> James want to use selenium locators to identify the element. Choose the correct set of commands to locate the element effectively. Ans: By.CssSelector(“div.errorMsg”) h) Match the following tools with the correct description ans: A-3 B-1 C-2 i) When verification fails in TestNG, what forces the test to stop execution and mark as failed. Choose the most appropriate option. Ans: Assertion Fail j) Which java enum is used to handle the keyboard strokes from web driver library? Choose the most appropriate option. Ans: keys 1) Testing an automation script to test a web application. He has to store the Logout link in the using a driver.findElement() method. Suggest Sean with a compatible return to leg out least object. (a) String (b) WebDriver (c) WebElement (d) List Ans: (c) WebElement Sub-topic: TestNG 2) Which of the following is correct about generating about an XML suite file in TestNG for Test Suite Exception. (a) TestNG XML suite can be generated at time of creating TestNG class. (b) TestNG XML suite can be generated using "Convert to testNG" option..........class is created. (c) TestNG XML suite file is automatically generated when user create a maven java project. (d) There is no option in Eclipse to generate XML suite file.
  • 62. (e) TestNG XML suite file can be generated by Jenkins Ans: (a) TestNG XML suite can be generated at time of creating TestNG class. (b) TestNG XML suite can be generated using "Convert to testNG" option..........class is created. Sub-topics: Switching to windows 3) Sarah is coding an automation script to switch to multiple windows in a web application . She has to store all the window instance in a java variable which is returned by driver.getWindowHandles(). Suggest Sarah with a compatible return type to store the window References. (a) List<String> (b) Set<String> (c) Array<String> (d) Window<String> Ans: (b) Set<String> Sub-topics: Extent Reports 4) Kevin wants to generate expensive report for the test automation project. He decides to use Extent Report Library. Which class in the library is used to create labels, code blocks and tables in the report? (a). ExtentHtmlReporter. (b). ExtentReports (c). MarkupHelper (d). ExtentTest. Ans: ( c) MarkupHelper. Sub-topics: WebDriver API 5) Sean is coding an automation Script to launch the web application on a browser window. Which of the following listed option(s) will help Sean to lunch the desired application on a web browser in selenium? (a). driver.get(“URL”) (b). driver.navigate().to(“URL”) (c). driver.navigate(“URL”) (d). driver.getUrl(“URL”) (e). driver.setUrl(“URL”) Ans: (a) driver.get("URL")
  • 63. (b) driver.navigate().to("URL") Sub-topics: WebDriver API 6) Sarah is coding an automation Script to locate a child element in an unordered list. The list is given below: <html> <body> <ul class=”cities”> <li>Bangalore</li> <li>Chennai</li> <li>Hydrabad</li> <li>Mumbai</li> <li>Pune</li> </ul> </body> </html> Sarah wants to locate the 3rd child element i.e Hydrabad. Suggest the appropriate locator stratgy for Sarah. (a) CSS = “ul:cities li:nth-child(2)” (b) CSS = “ul:cities li:nth-of-type(“Hydrabad”) (c) CSS =” ul:cities li:nth-child(“Hydrabad”) (d) CSS= “ul:cities li:nth-child(])” Ans: (b) css="ul.cities li:nth-of-type("Hyderabad") Sub-topic: WebDriver Api 7) James wants to automate the selection of ID proofs drop-down box in the web application. He has to verify the drop-down has a selection of more than one option. Which of the following method is suggested to James? Ans : isMultiple() 8) Kavin is using CSS selector as a locator strategy for the following element: <h1 id”msg01” name=”success” > Registeration Completed </h1>
  • 64. Ans: By.cssSelector("h1[id='msg01']") By.cssSelector("h1[id='msg01'][name='success']") 1) Which is an IDE extension that helps you detect and fix quality issues as you write code in python/HTML/Javascript/PHP? SonarQube SonarLint SonarQubeServer None of the above 2) Sarah is coding an automation script to switch to iFRAME in a web application. Which of the listed options will help sarah to switch to a particular frame on a web page using the library? driver.switchTo().frame(int index) driver.switchTo().frame(String nameOrld) driver.switchTo().frame(Webelement frameElement) driver.switchTo().frame() driver.switchTo().iframe(String name) 3) Kevin is planning to write an automation script for below test scenario: Given the user is on the Payment Page, he views a text box with attribute value=”Enter Mobile Number” written inside the box. The user must enter the mobile number in the box. Please check the correct command to help Kevin in automating this scenario. Assume that text box element is already identified and stored in mobileTxtBox variable. Choose the most appropriate option. mobileTxtBox.clear(); mobileTxtBox.sendKeys(“9090909090”); mobileTxtBox.sendKeys(“9090909090”); mobileTxtBox.sendKeys(“9090909090”);mobileTxtBox.clear(); mobileTxtBox.value=”9090909090”; 4) Which Java enum is used to handle the keyboard strokes from WebDriver Library? Actions Keyboard Keys Keyword 1. Which java interface is used to capture screenshot of a web page using web driver API ?
  • 65. Ans: TakeScreenshot 2. Henry is designing a script and using CSS Selector as the locator strategy. He must locate the element effectively. The element inspected looks like: <input id=“newPassword” type=“password”> ANS : By.cssSelector("input[id='newPassword']") 3. Select the correct order of execution of annotations, as per the life cycle of the TestNG which can be applied for test methods along with beforeXXXX – afterXXXX methods. ANS :@BeforeTest, @BeforeClass, @BeforeMethod, @Test, @AfterMethod, @AfterClass, @AfterTest 4. Kevin is using a CSS Selector as a locator strategy for the following element: <h1 id=“msg01” name=“success”>Registration completed</h1> He must identify the element effectively. ANS :By.cssSelector(“h1[id=‘msg01’]”), By.cssSelector(“h1[id=‘msg01’][name=‘success’]”. 5. Testing an automation script to test a web application. He has to store the Logout link in the using a driver.findElement() method. Suggest Sean with a compatible return to leg out least object. Ans:WebElement 6. While using soft assertion in the test class, james must specify a method, that will collate and display assertion results Ans:assertAll() 7. Sarah is coding to automate a test scenario in which she must fetch the booking id as a text message from the span element. The web element looks like: <span>Order Completed With Booking ID:6665</span> Help Sarah to find a method from the WebDriver Library to fetch the Booking ID. Ans: getText() 8. Sean is coding to automate mouse interactions on a web browser. Assist Sean to identify the mouse event specific methods from the below options. Ans: moveToElement(),moveByOffset(),release() 9. Which date format is used to customize the system data to year-month-day format? ANS:new SimpleDateFormat(“yyyy-MM-dd”) 10. What are the various status options available in the Extent reports library? Ans:PASS,FAIL,SKIP,FATAL,ERROR,WARNING,INFO 11. James is automating a script and using CSS Selector as a locator. What are the primitive types for designing the CSS selector? ANS - .id, .Attribute, .innerText() 12. Sam has created a TestNG project with below specified TestClass. public class TestClass { @Test(priority=1) public void method1() {….} @Test public void method3() {….} @Test public void method2() {….} @Test(priority=2) public void method4() {….} }Predict the test method execution sequence.Choose the most appropriate option.Ans:method2, method3, method1, method4. Q:1 Sarah wants to automate the selection of only one option from a dropdown box as shown below <html>
  • 66. <body> <select multiple> <option value=”web”>html</option> <option value=”prog”>python</option> <option value=”prog”>java</option> <option value=”prog”>python</option> <option value=”prog”>java</option> </select> </body> </html>. Sarah has to select only the fourth option,i.e,python from the options field. Ans: selectByVisibleText() selectByValue() selectByIndex() All of the above Q2: Sean is automating a test scenario, in which he has to fetch the URL of the web page using WebDriver API. Suggest a method for Sean to get the link address Choose the most appropriate option Ans:-getURL() get() getCurrentURL() getURI() Q3: Sean configured his project for the test suite execution using TestNG. He wants to perform parallel execution of the test cases. Which attribute represents the parallel execution of the test cases? a parallel = “methods” b parallel="tests" c parallel = “test-classes” d parallel =”test-cases” Q4: Fuller has written an automation script using selenium webdriver commands. He has used all the necessary and appropriate locators for interacting with the web elements. When he executed the script the web driver was not able to locate an element resulting in the test script failure. Which error/ exception is thrown by webdriver? NoSuchElementException NoSuchElementError NullPointerException
  • 67. ObjectNotFoundException Cannot predict the name of error/ exception Q5: Kevin is designing an automation test, where test data is specified in an external excel file. Which command will be helpful to write the data into a cell of the excel file? Assume c1 is the cell object. a c1.setCellValue("data") b c1.setValue(“data”) c c1.writeCellValue(“data”) d c1.setCellData(“data”) Q6: Which of the following is correct about generating about an XML suite file in TestNG for Test Suite Exception. (a) TestNG XML suite can be generated at time of creating TestNG class. (b) TestNG XML suite can be generated using "Convert to testNG" option..........class is created. (c) TestNG XML suite file is automatically generated when user create a maven java project. (d) There is no option in Eclipse to generate XML suite file. (e)TestNG XML suite file can be generated by Jenkins Q7: Which of the following Java classes are from the Extent API library? ExtentReports Status TakesScreenshot Actions Q8: Sean wants to switch to multiple frames on a web page when an operation is completed on a frame and test flow needs to move to another frame. Calling the driver.switch To().frame() immediately will not move the context to the next frame which is at the same level in DOM. The test will first need to switch to the main document and then activate the desired frame. Which
  • 68. method is used to switch back to the main document from the frame? driver switch To().body() driver.switch To().mainDocument() driver switch To().defaultDocument() driver.switchTo().defaultContent() Q9: Sam is designing an automation test, where test data is specified in an external excel file. Which command will be helpful to get across to the 2nd sheet of excel file. Assume wb is the workbook object. a wb.getSheetAt(1) b wb.getSheetAt(2) c wb.getSheet(1) d wb.getSheet(2) Q10: Sean is performing verification using Assert class functions from TestNG. Suggest him the corect method to verify the reference/address of the two objects to be identical assert True(Object1,Object2) assertRef(Obect1,Object2) assertEquals(Object1,Object2) assertSame(Object1,Object2) Q11: Sean is coding an automation Script to launch the web application on a browser window. Which of the following listed option(s) will help Sean to lunch the desired application on a web browser in selenium? (a). driver.get(“URL”) (b). driver.navigate().to(“URL”) (c). driver.navigate(“URL”) (d). driver.getUrl(“URL”) (e). driver.setUrl(“URL”) Ans: (a) driver.get("URL")
  • 69. (b) driver.navigate().to("URL") Q12: Sarah is coding an automation Script to locate a child element in an unordered list. The list is given below: <html> <body> <ul class=”cities”> <li>Bangalore</li> <li>Chennai</li> <li>Hydrabad</li> <li>Mumbai</li> <li>Pune</li> </ul> </body> </html> Sarah wants to locate the 3rd child element i.e Hydrabad. Suggest the appropriate locator stratgy for Sarah. (e) CSS = “ul:cities li:nth-child(2)” (f) CSS = “ul:cities li:nth-of-type(“Hydrabad”) (g) CSS =” ul:cities li:nth-child(“Hydrabad”) (h) CSS= “ul:cities li:nth-child(])” Ans: (b) css="ul.cities li:nth-of-type("Hyderabad") Q13: Sarah is coding an automation script, where she has to validate the price of the holiday package based on the drag & drop of island city from the menu. The Price is fetched from the server and displays without reloading the web page. Which WebDriver Library class has the predefined conditions for handling dynamic waits in Selenium WebDriver Library? ExplicitWait ImplicitWait WebDriverWait Expected Conditions
  • 70. Q14: What are the various status options available in the Extent reports library? e. PASS,FAIL,SKIP,FATAL,ERROR,WARNING,INFO f. SUCCESS,FAIL,SKIP ,ERROR,WARNING,INFO g. DONE,DEBUG,FAIL,SKIP,ERROR,WARNING,INFO h. ABORT,PASS,FAIL,DONE,ERROR,WARNING,INFO Q15: Kevin wants to fetch all the data from the country drop down menu and verify the data against data from the database. He is looking into the library for a method to fetch all the data from the country drop down box. Which method will help Kevin? f. selectAllOptions() g. getOptions() h. getAllOptions() i. getData() j. getText() Q16: Which java interface is used to capture screenshot of a web page using Web Driver API? ANS: TakeScreenshot Q17: There is an element on the webpages when inspected on the browser it looks like <div call=”errorMsg”>Error Message</div>. James wants to use selenium locations to identify the element. Choose the correct set of commands to locate the elements efficiently. Ans: By.CSS Selector(“div#errorMsg”) By.CSS Selector(“div.errorMsg”) By.CSS Selector(“div_errorMsg”) By.CSS Selector(“errorMsg”) Q18: ) Henry is designing a script and using CSS Selector as the locator strategy. He must locate the element effectively. The element inspected looks like: <input id="nowPassword" type="password"> Choose the most appropriate option. Ans:-By. CssSelector(“id=newPassword”) By .CssSelector(“input.newPassword”) By .CssSelector(“input_newPassword”) By .CssSelector(“input[id$=’Password’]”) Q19: Kevin is using a CSS Selector as a locator strategy for the following element: <h1 id=“msg01” name=“success”>Registration completed</h1> He must identify the element effectively. ANS – By.cssSelector(“h1[id=‘msg01’]”)
  • 71. By.cssSelector(“h1[id=‘msg01’][name=‘success’]”) Q20: Select the correct order of execution of annotations, as per the life cycle of the TestNG which can be applied for test methods along with beforeXXXX – afterXXXX methods. ANS - @BeforeTest, @BeforeClass, @BeforeMethod, @Test, @AfterMethod, @AfterClass, @AfterTest Q21: Testing an automation script to test a web application. He has to store the Logout link in the using a driver.findElement() method. Suggest Sean with a compatible return to leg out least object. (a) String (b) WebDriver (c) WebElement (d) List Ans: (c) WebElement 1Q) Sean is coding an automation script to test a web application. He has to store the Logout Ink in a Java vanable using a driver findElement() method. Suggest Sean with a compatible return type to store the Log out test object. Choose the best option a) String b) WebDnver c) WebElement d) List 2Q) Consider the below hlml code snippet Email : <label id='Email' class='style 1' name='input> Which is the best localor to identify the Email web element? Choose the most appropnate option. a) By.className('style1’) b) By.id(‘Email') c) By.name(‘Email’) d) By.xpath(‘//label[@id='Email’]’) 3Q) James is automating a scnpt and using CSS Seleclor as a localor. What are the primitive types for designing the CSS Selector?