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.
Input
- Action (https://github.com/runabove/venom/tree/master/executors/web/types.go)
- Screenshot
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
¶
Index ¶
Constants ¶
View Source
const Name = "web"
Name of executor
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Action ¶
type Action struct { Click *Click `yaml:"click,omitempty"` Fill []Fill `yaml:"fill,omitempty"` Find string `yaml:"find,omitempty"` }
Action represents what can be done with web executor
type Executor ¶
type Executor struct { Action Action `json:"action,omitempty" yaml:"action"` Screenshot string `json:"screenshot,omitempty" yaml:"screenshot"` }
Executor struct
type Result ¶
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
Click to show internal directories.
Click to hide internal directories.