44 lines
1.7 KiB
Gherkin
44 lines
1.7 KiB
Gherkin
Feature: The Chrome API client
|
|
|
|
Scenario: Using the Chrome.start method
|
|
Given the Chrome client
|
|
When the start method is called
|
|
Then Google Chrome must open
|
|
|
|
Scenario: Using the Chrome.start_headless method
|
|
Given the Chrome client
|
|
When the start_headless method is called
|
|
Then Google Chrome must open headless
|
|
|
|
Scenario: Using the Chrome.stop method
|
|
Given the Chrome client
|
|
And a Chrome instance
|
|
When the stop method is called upon it
|
|
Then this Google Chrome instance must close
|
|
|
|
Scenario: Using the Chrome.new method
|
|
Given the Chrome client
|
|
And a Chrome instance
|
|
When the new method is called
|
|
Then a new Google Chrome tab with the url given must open in the instance
|
|
|
|
Scenario: Using the Chrome.close method
|
|
Given the Chrome client
|
|
And a Chrome instance
|
|
And the id of a new Google Chrome tab opened
|
|
When the close method is called upon the tab id
|
|
Then the tab must close
|
|
|
|
Scenario: Using the Chrome.eval method for arithmetics
|
|
Given the Chrome client
|
|
And a Chrome instance
|
|
And the id of a new Google Chrome tab opened
|
|
When the eval method is called upon the tab id with a arithmetic command
|
|
Then this command must give back the result as a value
|
|
|
|
Scenario: Using the Chrome.eval method for JavaScript commands
|
|
Given the Chrome client
|
|
And a Chrome instance
|
|
And the id of a new Google Chrome tab opened in google.com
|
|
When the eval method is called upon the tab id with a JS command
|
|
Then this command must give back the element requested as a value |