From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 655F3E00DC9; Fri, 17 Jun 2016 06:21:59 -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,DKIM_SIGNED, DKIM_VALID, HTML_MESSAGE, 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 * [209.85.161.171 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 HTML_MESSAGE BODY: HTML included in message * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Received: from mail-yw0-f171.google.com (mail-yw0-f171.google.com [209.85.161.171]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 4057CE00B45 for ; Fri, 17 Jun 2016 06:21:57 -0700 (PDT) Received: by mail-yw0-f171.google.com with SMTP id z186so71209038ywd.2 for ; Fri, 17 Jun 2016 06:21:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=nnt8pSwsF318dN8AUdKGRdE66Kg/ALBGWmGMQlYvyYE=; b=ClNC8306PM89w2jyHsQvDq0bR9JAB/hoZA8Zp4+mfKl+kCa8nCGT2wCYurY7mEv3VI wIZpvQEsO7h65Pwy395VMR5yMFEAjdm+hPuMuTd948ZOoPq2QVgJ19CJASWHOUkRHWYe mCDl+qPw8Io+w7sk5xSZg3+k+Od5dI2Q7+HDVzm/jS+ENeOgy/Y+ViLQaqfyb6NL5xgL DUygaCZMOEoNJVMbT5xMJYV1Z5IVSUA5eyjxIAfgbNY5B4KESrUeDAgHCVh1LbuTnAzc y9nVTvD7lk9XcKFAmeCrPNejYfX9/v2I/pdG1dbquH7UUKxv6kFUPi8I+D3PNePM3Sfy En3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=nnt8pSwsF318dN8AUdKGRdE66Kg/ALBGWmGMQlYvyYE=; b=jRHh2xR6BGEN0POErBEMvVtB9K/RHzm6oMlp0IAqE8ZdfCNRZXWyOWaM1F+gyWEai+ qFpOB44f7uivts2D4uUTpV1BY3qVg0hvNPuNWdr/PtplY8ouMUplNoP5LQiuENPFLzBT 0D+Z2twZ/6RuEhXH83CRBE7uZMDZnwPgzjB9rlXypOfgJ+ig3QupdvQufS4Vsc0j3OSw /lAMS5d4BwuBDjdX5bQvVoqPt56oleWrZSalFGZPZjtsf4aoF9f67VV2IFjkd8V5w8k0 CUCSGcSYqMTT9vzjRDKrtAfr1O3YyfiQOhY2xhyqBgyD0Gyz3JIR1Mp66mV+imeO/mQL 7Z3w== X-Gm-Message-State: ALyK8tJLimmoeQnFKe6BksUnc0+UK6DDuZbIuxD6XKLOvQPkLWuGv7Dm/TZjXouqS4OtQh5SGpzDKo2ISuA3M1Gg MIME-Version: 1.0 X-Received: by 10.129.56.138 with SMTP id f132mr1066818ywa.240.1466169716837; Fri, 17 Jun 2016 06:21:56 -0700 (PDT) Received: by 10.13.198.193 with HTTP; Fri, 17 Jun 2016 06:21:56 -0700 (PDT) In-Reply-To: <5763DC1C.2000006@intel.com> References: <1466156485-11058-1-git-send-email-elliot.smith@intel.com> <1466156485-11058-2-git-send-email-elliot.smith@intel.com> <5763DC1C.2000006@intel.com> Date: Fri, 17 Jun 2016 14:21:56 +0100 Message-ID: From: "Smith, Elliot" To: Michael Wood Cc: toaster@yoctoproject.org Subject: Re: [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 13:21:59 -0000 Content-Type: multipart/alternative; boundary=001a114d6f302760420535793dd9 --001a114d6f302760420535793dd9 Content-Type: text/plain; charset=UTF-8 Surely setting the capabilities to marionette=true will not make a difference with older versions of Firefox? I tried setting a spurious capability with Firefox 47 and it was just ignored; I assumed that the 'marionette' capability would equally be ignored by older Firefoxes. I can get an older version of Firefox and test this assumption if you think it's critical. Elliot On 17 June 2016 at 12:16, Michael Wood wrote: > 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 >> --- >> 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': >> > > -- > _______________________________________________ > toaster mailing list > toaster@yoctoproject.org > https://lists.yoctoproject.org/listinfo/toaster > -- Elliot Smith Software Engineer Intel Open Source Technology Centre --001a114d6f302760420535793dd9 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Surely setting the capabilities to marionette=3Dtrue will = not make a difference with older versions of Firefox? I tried setting a spu= rious capability with Firefox 47 and it was just ignored; I assumed that th= e 'marionette' capability would equally be ignored by older Firefox= es.

I can get an older version of Firefox and test this = assumption if you think it's critical.

El= liot

On 17 June 2016 at 12:16, Michael Wood <michael.g.wood@intel= .com> wrote:
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>
---
=C2=A0 bitbake/lib/toaster/tests/browser/README=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 | 9 ++++++++-
=C2=A0 bitbake/lib/toaster/tests/browser/selenium_helpers.py | 5 ++++-
=C2=A0 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):
=C2=A0 * On *nix systems, put phantomjs on PATH
=C2=A0 * Not tested on Windows
=C2=A0 -Firefox should work without requiring additional software to be ins= talled.
+To run tests against Firefox:
+
+* Firefox versions 46 or earlier should work without requiring additional<= br> +software to be installed.
+* Firefox version 47 requires manual installation of the Marionette driver= ;
+see https://developer.mozil= la.org/en-US/docs/Mozilla/QA/Marionette/WebDriver.
+Ensure that the Marionette executable (wires on Linux, wires.exe on Window= s)
+is on your PATH.
=C2=A0 =C2=A0 The test case will instantiate a Selenium driver set by the =C2=A0 TOASTER_TESTS_BROWSER environment variable, or Chrome if this is not= specified.
diff --git a/bitbake/lib/toaster/tests/browser/selenium_helpers.py b/bitbak= e/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
=C2=A0 from django.contrib.staticfiles.testing import StaticLiveServerTestC= ase
=C2=A0 from selenium import webdriver
=C2=A0 from selenium.webdriver.support.ui import WebDriverWait
+from selenium.webdriver.common.desired_capabilities import DesiredCapabili= ties
=C2=A0 from selenium.common.exceptions import NoSuchElementException, \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 StaleElementReferenceException, TimeoutE= xception
=C2=A0 @@ -48,7 +49,9 @@ def create_selenium_driver(browser=3D'chrome&#= 39;):
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 service_args=3D["--ve= rbose", "--log-path=3Dselenium.log"]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 )
=C2=A0 =C2=A0 =C2=A0 elif browser =3D=3D 'firefox':
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 return webdriver.Firefox()
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 capabilities =3D DesiredCapabilities.FIREFOX +=C2=A0 =C2=A0 =C2=A0 =C2=A0 capabilities['marionette'] =3D True +=C2=A0 =C2=A0 =C2=A0 =C2=A0 return webdriver.Firefox(capabilities=3Dcapabi= lities)

This will force the use of the marionette/geckodriver/wires for all version= s 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.<= span class=3D"">


=C2=A0 =C2=A0 =C2=A0 elif browser =3D=3D 'ie':
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return webdriver.Ie()
=C2=A0 =C2=A0 =C2=A0 elif browser =3D=3D 'phantomjs':

--
_______________________________________________
toaster mailing list
toaster@yocto= project.org
https://lists.yoctoproject.org/listinfo/toaster



--
Elliot Smith
Software Engineer
Intel Open Source Technology Centre=
--001a114d6f302760420535793dd9--