Professional Documents
Culture Documents
A Which of the following is the correct syntax for invoking a Watir::Browser.new :firefox Watir::Browser.Launch :firefox
firefox browser?
C Which keyword is used to call a library file in your script? import include
A What are the 2 files required to execute a Cucumber test features,step_definiton features,support
scenario?
A What is the shortut key to open setting in RubyMine IDE? Ctrl+Alt+S Ctrl+Shift+S
Cucumber tags are used to sort the Cucumber tags are used to give
D Why we use the tags for scenarios in Cucumber ? scenarios a scenario a layout
A What is the syntax of executing all the feature files in a cucumber features cucumber features/all
project from command line?
A What is env.rb used for? It is used to load the required libraries It is used to load the scenarios
for cucumber scenario execution for execution
C "____" is the file extension for a ruby file cucumber? .feature .ruby
B Which testing model is best suited for the BDD Waterfall Agile
framework?
What is the default feature for parameterizing your
D Excel CSV
scenario in Ruby?
D This command is used to check the Ruby version installed. ruby -vi ruby -c
B Which file cannot be used to import data into Ruby Excel JS file
Cucumber?
B How can we a parameterize any input in the feature file in Write the parameter in single quotes Write the parameter in double
Ruby Cucumber? quotes
Which one of the following is used to select a checkbox in
C Ruby Cucumber? .set .select
B Cucumber is used for "------------" Testing? System & Unit Testing System & Integration Testing
A regular expression is a
A What is a Regular expression? A regular expression is a pattern pattern describing numbers
describing a certain amount of text only.
A What does a features/support file contain? Features/ support file contains Features/ support file contains
supporting ruby code supporting cucumber code
D What is cucumber.yml file in Ruby cucumber? It is used to write step definitions It is used to write features
A Command used for installing a Gem file gem install gemfile gem install gems
objExcel=???.new("Excel.Application")
C "???" executes after the each step execution Before After
A "???" execute before the feature file execution Before After
D "-----" exercise the concept – “ You write test cases and BDD Gherkin
then develop the product that suits them"
C "----" is a framework for writing and executing high level Capybara Calabash
descriptions of your software’s functionality.
C What is the tag used for writing a scenario for Selenium in @Test @Scenario
Ruby Cucumber?
Gems Lib
require call
Win32OLE yaml
uuidtools redcard
When Also
support,step_definitions feature,step_definition
| _
& $
Poltergeist Phantom
Ctrl+S Alt+S
Tags Drivers
@ %
support WebDriver
.rb .exe
Iterative V model
Concatenation L value
CTRL+/ ALT+/
starts_with size
.edit .set_field
.exist? .ispresent?
Refactor---->Rename Refactor--->Edit
F5 Shift+F10
Shift+F10 F9
.click .check
A regular expression is an
encoding used for describing A regular expression is a pattern used for
a text variable names.
Watir Hooks
Pipe(||) And(&&)
RUBYPATH RUBYLIB_PREFIX
WATIR Excel
AfterStep BeforeStep
AfterStep BeforeStep
Require_Method() Watir
Acceptance Regression
Gherkin BDD
Iterative BDD
mspec nspec
@selenium @selenium-cucumber
find xpath
* %
Ans Question Option 1
A Which of the following is the correct syntax for implementing a implicit wait of objDriver.driver.manage.timeouts.implicit_
5 seconds? wait=5
Which of the following is the correct syntax for command line execution of a
A feature file named 'MyScript' assuming we are at the project folder in cucumber features/MyScript.feature
Command Prompt?
Which of the following is the correct syntax for command line execution of a
A feature file named 'MyScript' which has a tag named '@smoke' assuming we cucumber features --tags @smoke
are at the project folder in Command Prompt?
D Which of the following is the correct syntax for reports generation via cucumber features\Opencart.feature --
command prompt? format html --out TestReport.html
C Which of the following is the correct syntax for declaring an implicit timeout objDriver.driver.manage.timeouts.implicit_
using Selenium WebDriver? wait=5
B How do we identify a WebElement(Button) in Ruby Cucumber? driver.webbutton(:name=>"")
C How do we identify a RadioButton in Ruby Cucmber? driver.radio(:name=>"")
A How do we identify a ComboBox in Ruby Cucmber? driver.select_list(:name=>"")
C Parameters
foreach("path") do
D Which one of the followin is the correct way of reading data from a CSV file?
|row|
puts row
end
objSheet=objExcel.workbooks.open("Path")
A How do we open an Excel sheet through Ruby Cucumber?
.worksheets("Sheet1")
Feature: Visit XYZ page in abc.com
Scenario : Visit abc.com
D Which one of the following options is the correct form of writing a feature file?
When: I click on XYZ page
Then: I should see ABC page
Given: I am on abc.com
C Which one of the following is correct?
I click on login
What is the output of the following code: In End
END {puts "In End"} In Begin
C
BEGIN {puts "In Begin"} middle
puts "middle"
What is the output of the following code: double quoted 3
age=3 single quoted {age}
x="double quoted {age}"
B
y='single quoted {age}'
puts x
puts y
What is the output of the following code:
C message="Ruby Programming" Ruby Programming
puts message[0,message.length-4]
What is the output of the following code: hello
.3 times do hello
A
puts "hello" hello
end
What is the output of the following code:
i=10
D while i==10 Hello 10 (10 times)
puts "Hello {i}"
end
What is the output of the following code:
B 010 Kumar
B 010 Kumar
empdata={"Emp ID"=>"010","Name"=>"Kumar"}
puts empdata["Name"]
What is the output of the following code: Hello
10.downto(7) do Hello
puts "Hello" Hello
A end Hello
Error for "i" not initialized Error because the value of "i" is not Prints 0
increased
hello
hello Syntax Error as "for/while" is not hello
defined
Hello 0 (9 times) Hello {0} (infinite times) Hello {i} (infinite times)
Hello Hello
Hello Hello
Hello Hello
Hello Error as For/while is not implemented
Hello
Hello
Hello
Hello - 9 times Hello - infinite times Error because the value of "i" is not increased
Hello 0 (9 times) Hello {0} (infinite times) Hello {i} (infinite times)
Ans Question Option 1 Option 2
A Which of the following is the correct syntax for invoking a Watir::Browser.new :firefox Watir::Browser.Launch :firefo
firefox browser? x
B What are the library files in Ruby/Cucumber called? JAR Utils
C Which keyword is used to call a library file in your script? import include
B Which of the following gem is required for accessing an CSV signet csv
file?
D Which of the following is not a keyword in Cucumber? Given Then
A What are the 2 files required to execute a Cucumber test features,step_definiton features,support
scenario?
A What is the shortut key to open setting in RubyMine IDE? Ctrl+Alt+S Ctrl+Shift+S
B What are before, after, beforeStep and afterStep in Cucumber? support Hooks
C "____" is the file extension for a ruby file cucumber? .feature .ruby
B Which testing model is best suited for the BDD framework? Waterfall Agile
D This command is used to check the Ruby version installed. ruby -vi ruby -c
B Which file cannot be used to import data into Ruby Cucumber? Excel JS file
B Which one of the following is not a valid String command in reverse equal
Ruby Cucumber?
A The command used for enering data in a text field in Ruby .set .type
Cucumber?
C Which command is used to check for the presence of an object .exist .ispresent
in Ruby Cucumber?
C How do we "Rename" a file in Ruby Cucumber? Rename F2 key
D Shortcut for Running a Scenario in Ruby Cucumber? Shift+F5 Shift+F8
A Shortcut for Debugging a Scenario in Ruby Cucumber? Shift+F9 Shift+F11
B How can we a parameterize any input in the feature file in Ruby Write the parameter in single Write the parameter in
Cucumber? quotes double quotes
C Which one of the following is used to select a checkbox in Ruby .set .select
Cucumber?
Which of the following is not part of a "feature" file in Ruby
C Cucumber? Feature Scenario
B Cucumber is used for "------------" Testing? System & Unit Testing System & Integration Testing
D Which of these we do NOT need to run a Cucumber Web Test? Gems Ruby
A Command used for installing a Gem file gem install gemfile gem install gems
What is missing in the following line of code used to invoke the
B Excel Application in Ruby Cucumber? CSV WIN32OLE
objExcel=???.new("Excel.Application")
C "???" executes after the each step execution Before After
A "???" execute before the feature file execution Before After
"???" loads and processes the Ruby code from a separate file,
B including whatever classes, modules, methods, and constants env.rb Require()
are in that file into the current scope
D "-----" exercise the concept – “ You write test cases and then BDD Gherkin
develop the product that suits them"
C "----" is a framework for writing and executing high level Capybara Calabash
descriptions of your software’s functionality.
D Which one of the following is not a specification file? spec rspec
C What is the tag used for writing a scenario for Selenium in Ruby @Test @Scenario
Cucumber?
Which of the following is the Object locator used for finding
B objects through Selenium in Ruby Cucumber? find_by_element find_element
Gems Lib
require call
Win32OLE yaml
uuidtools redcard
When Also
support,step_definitions feature,step_definition
| _
& $
Poltergeist Phantom
Ctrl+S Alt+S
Tags Drivers
@ %
support WebDriver
.rb .exe
Iterative V model
Concatenation L value
CTRL+/ ALT+/
starts_with size
.edit .set_field
.exist? .ispresent?
Refactor---->Rename Refactor--->Edit
F5 Shift+F10
Shift+F10 F9
Write the parameter after the Write the parameter as it is.
+ symbol
.click .check
A regular expression is an
A regular expression is a pattern
encoding used for describing a used for variable names.
text
Watir Hooks
Pipe(||) And(&&)
RUBYPATH RUBYLIB_PREFIX
WATIR Excel
AfterStep BeforeStep
AfterStep BeforeStep
Require_Method() Watir
Acceptance Regression
Gherkin BDD
Iterative BDD
mspec nspec
@selenium @selenium-cucumber
find xpath
* %