Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 2FD8AE00DA2; Fri, 17 Jun 2016 03:19:41 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no * trust * [23.83.214.10 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Greylist: delayed 1809 seconds by postgrey-1.32 at yocto-www; Fri, 17 Jun 2016 03:19:15 PDT Received: from gt-egress-002.mailchannels.net (barb.maple.relay.mailchannels.net [23.83.214.10]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 20329E00DA2 for ; Fri, 17 Jun 2016 03:19:15 -0700 (PDT) X-Sender-Id: wwwh|x-authuser|elliot@townx.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 7CDC01697F9; Fri, 17 Jun 2016 09:41:35 +0000 (UTC) Received: from uscentral428.accountservergroup.com (ip-10-213-0-221.us-west-2.compute.internal [10.213.0.221]) by relay.mailchannels.net (Postfix) with ESMTPA id D7A4D1BC80B; Fri, 17 Jun 2016 09:41:34 +0000 (UTC) X-Sender-Id: wwwh|x-authuser|elliot@townx.org Received: from uscentral428.accountservergroup.com (uscentral428.accountservergroup.com [10.21.13.78]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.6.14); Fri, 17 Jun 2016 09:41:35 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: wwwh|x-authuser|elliot@townx.org X-MailChannels-Auth-Id: wwwh X-MC-Loop-Signature: 1466156495153:750541943 X-MC-Ingress-Time: 1466156495153 Received: from [176.251.19.34] (port=39974 helo=localhost.localdomain) by uscentral428.accountservergroup.com with esmtpa (Exim 4.87) (envelope-from ) id 1bDqJX-00072F-Jz; Fri, 17 Jun 2016 05:43:47 -0400 From: Elliot Smith To: toaster@yoctoproject.org Date: Fri, 17 Jun 2016 10:41:25 +0100 Message-Id: <1466156485-11058-2-git-send-email-elliot.smith@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1466156485-11058-1-git-send-email-elliot.smith@intel.com> References: <1466156485-11058-1-git-send-email-elliot.smith@intel.com> X-AuthUser: elliot@townx.org Subject: [PATCH 2/2] toaster-tests: define capabilities for latest Firefox driver X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jun 2016 10:19:41 -0000 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 --- 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) elif browser == 'ie': return webdriver.Ie() elif browser == 'phantomjs': -- 2.7.4