Giter Site home page Giter Site logo

selenium-axis-plugin's Introduction

selenium-axis-plugin

This plugin creates an axis based on the Selenium grid capabilities. It will also build against the SauceLabs Selenium capability at the same time.

So you can have an axis with both capabilities

It does this by creating four environment variables to pass to the build phase.

  • LABEL_URL for either the local Selenium or SauceLabs
  • LABEL_BROWSER for the browser (e.g. chrome, firefox)
  • LABEL_PLATFORM for the platform (e.g. LINUX, VISTA)
  • LABEL_VERSION for the browser version

You can use any label you want for the axis, so long as all the axes are unique

This is an example test in Perl which can be run as a build step

use Test::More tests=>8;
use_ok 'Selenium::Remote::Driver';

ok $ENV{TEST_BROWSER}, "Browser name set";
ok $ENV{TEST_PLATFORM}, "Platform name set";
ok $ENV{TEST_VERSION}, "Version name set";
ok $ENV{TEST_URL}, "URL set";

my $browser  = $ENV{TEST_BROWSER};
my $platform = $ENV{TEST_PLATFORM};
my $version  = $ENV{TEST_VERSION};
my $url      = $ENV{TEST_URL};

#so perl likes the selenium url not to have http:// on the front
#for SauceLabs this will be user:password@ which is set in the global config
$url =~ s|^http://||;

my $parms = [remote_server_addr=>$url ];

push @$parms, (platform => $platform) unless $platform eq 'Any';
push @$parms, (browser_name => $browser) unless $browser eq 'Any';
push @$parms, (version => $version) unless $version eq 'Any';

push @$parms, (extra_capabilities => {name => $ENV{BUILD_TAG}||$0 });

use Data::Dumper;
print Dumper ($parms);

my $driver = new_ok('Selenium::Remote::Driver' => $parms);

ok $driver->get('http://www.google.com');
is $driver->get_title(), 'Google';
$driver->quit();

For Selenium it will detect the capabilities and display them. For SauceLabs it will pick some at random from the available. Both will be rebuilt ar build time so new capabilities are incorporated without revisiting the project.

I would advise using the Mask Password Plugin to mask passwords in the console log.

You will need a SauceLabs account to use the SauceLabs part. If you don't want this then you can turn it off in the global config.

selenium-axis-plugin's People

Contributors

jeremymarshall avatar sghill avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

selenium-axis-plugin's Issues

Selecting Windows 7 Firefox 65 translates into Windows 2008

Screen Shot 2019-05-09 at 10 54 48 AM

Screen Shot 2019-05-09 at 10 55 19 AM

Test fails due to incorrect settings.
org.openqa.selenium.WebDriverException: Unable to parse remote response: Misconfigured -- Unsupported OS/browser/version/device combo: OS: 'Windows 2003', Browser: 'firefox', Version: '65.', Device: 'unspecified'

Upgrade Gradle / JPI Plugin?

Hi @JeremyMarshall (repo's sole contributor),

Would you be interested in a PR to upgrade Gradle and the jpi plugin to the most recent versions?

This plugin is currently listed as a real-world example of the gradle-jpi-plugin, but it is using very old versions of both Gradle and the plugin at the moment. The upgrade could potentially serve as an example of how to upgrade to the latest version, but since there has not been any activity since 2014 I wanted to ask before putting in the effort.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.