package
Version:
v0.0.6
Opens a new window with list of versions in this module.
Published: Apr 7, 2017
License: BSD-3-Clause
Opens a new window with license information.
Imports: 9
Opens a new window with list of imports.
Imported by: 5
Opens a new window with list of known importers.
README
¶
Venom - Executor Web
Navigate in a web application
Use case: You have a web application and you want to check some behaviours ?
Venom allows you to navigate into it and execute actions.
name: TestSuite Web
testcases:
- name: TestCase Google search
context:
type: web
width: 1920
height: 1080
driver: phantomjs
steps:
- action:
navigate:
url: https://www.google.fr
assertions:
- result.title ShouldEqual Google
- result.url ShouldEqual https://www.google.fr
- action:
find: input[name="q"]
assertions:
- result.find ShouldEqual 1
- action:
fill:
- find: input[name="q"]
text: "venom runabove"
- action:
click:
find: input[value="Recherche Google"]
wait: 1
screenshot: googlesearch.jpg
Output
- result.url
- result.timeseconds
- result.timehuman
- result.title
- result.find
Documentation
¶
New returns a new Executor
type Action struct {
Click *Click `yaml:"click,omitempty"`
Fill []Fill `yaml:"fill,omitempty"`
Find string `yaml:"find,omitempty"`
Navigate *Navigate `yaml:"navigate,omitempty"`
}
Action represents what can be done with web executor
type Click struct {
Find string `yaml:"find,omitempty"`
Wait int64 `yaml:"wait"`
}
type Executor struct {
Action Action `json:"action,omitempty" yaml:"action"`
Screenshot string `json:"screenshot,omitempty" yaml:"screenshot"`
}
Executor struct
type Fill struct {
Find string `yaml:"find,omitempty"`
Text string `yaml:"text,omitempty"`
}
Fill represents informations needed to fill input/textarea
type Navigate struct {
Url string `yaml:"url,omitempty"`
Reset bool `yaml:"reset,omitempty"`
}
type Result struct {
Executor Executor `json:"executor,omitempty" yaml:"executor,omitempty"`
Find int `json:"find,omitempty" yaml:"find,omitempty"`
HTML string `json:"html,omitempty" yaml:"html,omitempty"`
TimeSeconds float64 `json:"timeseconds,omitempty" yaml:"timeseconds,omitempty"`
TimeHuman string `json:"timehuman,omitempty" yaml:"timehuman,omitempty"`
Title string `json:"title,omitempty" yaml:"title,omitempty"`
URL string `json:"url,omitempty" yaml:"url,omitempty"`
}
Result represents a step result
Source Files
¶
Click to show internal directories.
Click to hide internal directories.