From: Michael Wood <michael.g.wood@intel.com>
To: toaster@yoctoproject.org
Subject: Re: [PATCH 2/2] toaster-tests: define capabilities for latest Firefox driver
Date: Fri, 17 Jun 2016 12:16:44 +0100 [thread overview]
Message-ID: <5763DC1C.2000006@intel.com> (raw)
In-Reply-To: <1466156485-11058-2-git-send-email-elliot.smith@intel.com>
On 17/06/16 10:41, Elliot Smith wrote:
> The Firefox 47 WebDriver requires a download of a separate binary
> and an additional capability to be defined on the driver.
>
> Modify our tests so that when Firefox 47 is set as the browser
> for the tests, this capability is defined. Also add a note to the
> README about the additional installation steps required.
>
> Signed-off-by: Elliot Smith <elliot.smith@intel.com>
> ---
> bitbake/lib/toaster/tests/browser/README | 9 ++++++++-
> bitbake/lib/toaster/tests/browser/selenium_helpers.py | 5 ++++-
> 2 files changed, 12 insertions(+), 2 deletions(-)
>
> diff --git a/bitbake/lib/toaster/tests/browser/README b/bitbake/lib/toaster/tests/browser/README
> index f57154e..43e14c5 100644
> --- a/bitbake/lib/toaster/tests/browser/README
> +++ b/bitbake/lib/toaster/tests/browser/README
> @@ -24,7 +24,14 @@ To run tests against PhantomJS (headless):
> * On *nix systems, put phantomjs on PATH
> * Not tested on Windows
>
> -Firefox should work without requiring additional software to be installed.
> +To run tests against Firefox:
> +
> +* Firefox versions 46 or earlier should work without requiring additional
> +software to be installed.
> +* Firefox version 47 requires manual installation of the Marionette driver;
> +see https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette/WebDriver.
> +Ensure that the Marionette executable (wires on Linux, wires.exe on Windows)
> +is on your PATH.
>
> The test case will instantiate a Selenium driver set by the
> TOASTER_TESTS_BROWSER environment variable, or Chrome if this is not specified.
> diff --git a/bitbake/lib/toaster/tests/browser/selenium_helpers.py b/bitbake/lib/toaster/tests/browser/selenium_helpers.py
> index 54db2e8..f3bb1a3 100644
> --- a/bitbake/lib/toaster/tests/browser/selenium_helpers.py
> +++ b/bitbake/lib/toaster/tests/browser/selenium_helpers.py
> @@ -34,6 +34,7 @@ import time
> from django.contrib.staticfiles.testing import StaticLiveServerTestCase
> from selenium import webdriver
> from selenium.webdriver.support.ui import WebDriverWait
> +from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
> from selenium.common.exceptions import NoSuchElementException, \
> StaleElementReferenceException, TimeoutException
>
> @@ -48,7 +49,9 @@ def create_selenium_driver(browser='chrome'):
> service_args=["--verbose", "--log-path=selenium.log"]
> )
> elif browser == 'firefox':
> - return webdriver.Firefox()
> + capabilities = DesiredCapabilities.FIREFOX
> + capabilities['marionette'] = True
> + return webdriver.Firefox(capabilities=capabilities)
This will force the use of the marionette/geckodriver/wires for all
versions of firefox (apparently it works with v45 onwards) too so,
either we need to switch those capabilities depending on the version of
firefox we find or we will need to clarify that you'll always need this
external driver.
> elif browser == 'ie':
> return webdriver.Ie()
> elif browser == 'phantomjs':
next prev parent reply other threads:[~2016-06-17 11:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-17 9:41 [PATCH 1/2] toaster-tests: remove click on disabled element in test Elliot Smith
2016-06-17 9:41 ` [PATCH 2/2] toaster-tests: define capabilities for latest Firefox driver Elliot Smith
2016-06-17 11:16 ` Michael Wood [this message]
2016-06-17 13:21 ` Smith, Elliot
2016-06-17 13:39 ` Michael Wood
-- strict thread matches above, loose matches on Subject: below --
2016-06-17 17:52 [PATCH 1/2] toaster-tests: remove click on disabled element in test Michael Wood
2016-06-17 17:52 ` [PATCH 2/2] toaster-tests: define capabilities for latest Firefox driver Michael Wood
2016-07-20 15:55 ` Michael Wood
2016-07-21 9:20 ` Smith, Elliot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5763DC1C.2000006@intel.com \
--to=michael.g.wood@intel.com \
--cc=toaster@yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.