From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 88188E00DCA; Fri, 17 Jun 2016 06:39:29 -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=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 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 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [74.125.82.53 listed in list.dnswl.org] Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com [74.125.82.53]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id C50FCE00B74 for ; Fri, 17 Jun 2016 06:39:26 -0700 (PDT) Received: by mail-wm0-f53.google.com with SMTP id a66so164975wme.0 for ; Fri, 17 Jun 2016 06:39:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=RhzRut+eMfofI8d2wqYRKphiTnjrZzbuq+ReTThapi0=; b=WT8stv2JwyeCndiprgXgVwx/XcgjccA5ZyRuUdrFGjc3O39rlbhzEbVs0hnnyGC5eD emBx2Re4pIGtOXHxcSNSYDJMiNM70BFFIFvJqslomovDnyTt2MWNjkilC7BmUzs+OHnp WMYnHSqwfHJcKR2/c+8ljyryhHGpCBQSNKapiw3vyPnw53pDFte789bvZsGWUx5ZbRAu XvCY+rllcTnZB/75ObAMiYEdzmiqb6HWrNk0U6/kjVj3978McULeJ4eOKcMzA/cit1nF gS+FKmDpKUUDxbUVevxsDcB2M5topB67P8q17w9168DVIAxgfdIGotcvTpqVlCz3V384 J7zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=RhzRut+eMfofI8d2wqYRKphiTnjrZzbuq+ReTThapi0=; b=EsnVPhDTUKJ+X5yZxNKV6VWOBdHXhL6F4aeiS9MPX23vJpLBRDpYb4deb8Jp5fxNqv +JRojdXolBJSrH4WZtBdG+HmPhMUGK75LyIbTyM11Mn9+71WM93UE3QIqCRynsMeWBfD 5TcqyyD15pXSWF1g/Vtw1xe3+7DMQ7xiu6uZ03ZmgaX81vvdRD/eM9UfUoseq6QLBGvF HD4f5mD7Xd3Y2ppoOvbXNKAs3XXQkuQFjXHNIyB2qB5k2NvGlQmOM82XLbH/Foybn9BR Pj+UqafzJHo7BqYB7qnbX+0b6jKznd2e3pXRMDk0UWKq+n7YHY7kPLQ/b1TC/oapAgCG e3VQ== X-Gm-Message-State: ALyK8tI0AOO6sdmp5kJPKCS3Pc+E856c7iunjIX+1LpXArcfJKoiexU4YLQ9Wp5lK6UpX+gC X-Received: by 10.194.201.70 with SMTP id jy6mr2663394wjc.150.1466170765287; Fri, 17 Jun 2016 06:39:25 -0700 (PDT) Received: from [192.168.0.78] (host86-169-85-169.range86-169.btcentralplus.com. [86.169.85.169]) by smtp.googlemail.com with ESMTPSA id l9sm48937247wjm.0.2016.06.17.06.39.24 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 17 Jun 2016 06:39:24 -0700 (PDT) To: "Smith, Elliot" 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> From: Michael Wood Message-ID: <5763FD8B.6020209@intel.com> Date: Fri, 17 Jun 2016 14:39:23 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: 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:39:29 -0000 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit This is the traceback with no wires executable and firefox 47 : (bothpythons) michael@orion:~/dev/yocto/poky/bitbake/lib/toaster(toaster-next %)$ TOASTER_TESTS_BROWSER=firefox ./manage.py test tests.browser --failfast Creating test database for alias 'default'... EException ignored in: > Traceback (most recent call last): File "/home/michael/dev/yocto/poky/bothpythons/local/lib/python3.5/site-packages/selenium/webdriver/common/service.py", line 162, in __del__ self.stop() File "/home/michael/dev/yocto/poky/bothpythons/local/lib/python3.5/site-packages/selenium/webdriver/common/service.py", line 134, in stop if self.process is None: AttributeError: 'Service' object has no attribute 'process' ====================================================================== ERROR: setUpClass (tests.browser.test_all_builds_page.TestAllBuildsPage) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/michael/dev/yocto/poky/bothpythons/local/lib/python3.5/site-packages/selenium/webdriver/common/service.py", line 62, in start stdout=self.log_file, stderr=self.log_file) File "/usr/lib/python3.5/subprocess.py", line 947, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.5/subprocess.py", line 1541, in _execute_child raise child_exception_type(errno_num, err_msg) FileNotFoundError: [Errno 2] No such file or directory: 'wires' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/michael/dev/yocto/poky/bitbake/lib/toaster/tests/browser/selenium_helpers.py", line 135, in setUpClass cls.driver = create_selenium_driver() File "/home/michael/dev/yocto/poky/bitbake/lib/toaster/tests/browser/selenium_helpers.py", line 54, in create_selenium_driver return webdriver.Firefox(capabilities=capabilities) File "/home/michael/dev/yocto/poky/bothpythons/local/lib/python3.5/site-packages/selenium/webdriver/firefox/webdriver.py", line 66, in __init__ self.service.start() File "/home/michael/dev/yocto/poky/bothpythons/local/lib/python3.5/site-packages/selenium/webdriver/common/service.py", line 69, in start os.path.basename(self.path), self.start_error_message) selenium.common.exceptions.WebDriverException: Message: 'wires' executable needs to be in PATH. Michael On 17/06/16 14:21, Smith, Elliot wrote: > 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 > > --------------------------------------------------------------------- > Intel Corporation (UK) Limited > Registered No. 1134945 (England) > Registered Office: Pipers Way, Swindon SN3 1RJ > VAT No: 860 2173 47 > > This e-mail and any attachments may contain confidential material for > the sole use of the intended recipient(s). Any review or distribution > by others is strictly prohibited. If you are not the intended > recipient, please contact the sender and delete all copies. >