VisualGridRunner method

Class: VisualGridRunnerPlatform: Selenium 3Language: Python SDK:

Use this method to create a runner that manages tests that use the Ultrafast Grid to render screenshots.

An object of this class is used to manage multiple Eyes sessions using the Ultrafast Grid. Pass this object to each Eyes constructor. Wait for the results of all instances using the method VisualGridRunner.get_all_test_results.

Syntax


runner = VisualGridRunner(options_or_concurrency)

Parameters

options_or_concurrency
Type:Union[RunnerOptions,int] [Optional : default = RunnerOptions() ]
Pass the concurrency to be used using a RunnerOptions constructor and test_concurrency methods as shown in the example below. Passing the concurrency as an integer will eventually be deprecated and should not be used.

Return value

Type: None

Example

The example below demonstrates the creation of a VisualGridRunner instance. It is initialized with a call to the constructor RunnerOptions. A call to test_concurrency is then appended with a parameter of 10. This runner instance is passed to the Eyes instance when it is created. The end effect is that the runner manages the workflow and concurrency of all Eyes instances that are initialized with that runner. Passing a parameter of 10 means that the runner limits the concurrency to a maximum of 10 active test executions.

runner = VisualGridRunner(RunnerOptions().test_concurrency(concurrent_sessions))   
eyes = Eyes(runner)