Ans Option 1 Option 2: Watir::Browser - New:firefox
Ans Option 1 Option 2: Watir::Browser - New:firefox
Ans Option 1 Option 2: Watir::Browser - New:firefox
Which of the following is the correct syntax for invoking a Watir::Browser.new :firefox
A 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?
Which symbol is used to separate columns in Scenario
C / \
Outline?
Which symbol is used as preffix to declare a variable as
D @ !
public?
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
D Why we use the tags for scenarios in Cucumber ? scenarios give a scenario a layout
C "____" is the file extension for a ruby file cucumber? .feature .ruby
How can we a parameterize any input in the feature file Write the parameter in double
B Write the parameter in single quotes
in Ruby Cucumber? quotes
Which one of the following is used to select a checkbox in .set
C .select
Ruby Cucumber?
Which of the following is not part of a "feature" file in
C Feature Scenario
Ruby Cucumber?
B Cucumber is used for "------------" Testing? System & Unit Testing System & Integration Testing
A regular expression is a
A regular expression is a pattern
A What is a Regular expression? pattern describing numbers
describing a certain amount of text
only.
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
C What is the tag used for writing a scenario for Selenium @Test @Scenario
in 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
variable names.
a text
Watir Hooks
Pipe(||) And(&&)
RUBYPATH RUBYLIB_PREFIX
WATIR Excel
AfterStep BeforeStep
AfterStep BeforeStep
Require_Method() Watir
Acceptance Regression
Gherkin BDD
Iterative BDD
Cucumber Keyword Driven
mspec nspec
@selenium @selenium-cucumber
find xpath
* %
Ans Question Option 1
Which of the following is the correct syntax for implementing a implicit wait of objDriver.driver.manage.timeouts.implicit_
A
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?
Which of the following is the correct syntax for reports generation via cucumber features\Opencart.feature
D command prompt? --format html --out TestReport.html
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
Which one of the following options is the correct form of writing a feature
D 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
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)