Skip to content

Provengo/learn-basic-selenium-actuations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SeleniumBasics

A Provnego project for demonstrating the basics of Selenium-based actuation. This project searches for "pizza", "strawberry", or "banana" in the Ecosia search engine, and validates that pages containing these terms were indeed found.

This demo project does not look into any other features of the Provengo system, such as DSLs, multi-level event flows, optimized test suite generation, etc. Just Selenium actuation and some Provengo extensions to JavaScript.
Provengo is not publicly accessible yet. If you find this repo interesting and wand to join our closed beta, please contact hello@provengo.tech.
🔥
For the autoamtion sections below to work, you must have a running Selenium server (grid), Chrome, and a chrome selenium driver. Selenium Server can be installed from here. For the Chrome driver, see the "Browsers" section. You’ll have to scroll down quite a bit.

Files of Interest

Useful Commands

💠
In the below listings, we assume that provengo.bat is in the path, and that selenium-basics is the path to this directory (i.e. run this code from the directory that directly contains selenium-basics). For UNIX systems, change provengo.bat to provengo.sh.

Randomized Dry Run

Perform a single run through the specification, with no actuations. Good for "Sanity checks", e.g. to see examples of what can happen. Does not require any Selenium server.

provengo.bat run --dry-run selenium-basics

Randomized Run

Perform a single run through the specification. Selenium server needs to be running for this.

provengo.bat run selenium-basics

Running with the browser visible

provengo.bat run --show-sessions selenium-basics

Running with delayed actions. Units are milliseconds, so the 5000 in the below snippet means "5 seconds".

provengo.bat run --action-delay 5000 selenium-basics

The above flags can of course be used together.

Visualize the Spec

💠
This requires Graphviz to be installed.

Draw the specification in a PDF file.

provengo.bat analyze -f pdf selenium-basics

Sample Runs from the Spec

Sample 10 scenarios into a file. The scenarios are stored in a file called samples.json (this can be changed using the -o/--output-file switch).

provengo.bat sample --delete-previous --sample-size 10 selenium-basics

Run the Sample as a Suite

Run the sampled tests as a single test suite.

provengo.bat run --run-source samples.json selenium-basics

Create Run Logs

Creates a report of the tests run, in the form of a static HTML site.

provengo.bat report selenium-basics

NOTES

  • This is a very basic sample project that does not cover all system features. For example, we left suite optimizations and DSLs out.

  • To gain more visibility into what provengo is doing, invoke it with the --verbose flag between provengo and the verb, like so:

    provengo.bat --verbose run selenium-sample
  • To display command options, type provengo.bat in the console. To display the reference for a specific command, add -h after it, like so: provengo.bar run -h.

About

A sample project with basic selenium actuations.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published