From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 6BA3DE00DFE; Fri, 17 Jun 2016 10:53:56 -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: * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [74.125.82.54 listed in list.dnswl.org] * -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 Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com [74.125.82.54]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id C4BC5E00DF6 for ; Fri, 17 Jun 2016 10:53:54 -0700 (PDT) Received: by mail-wm0-f54.google.com with SMTP id v199so7021110wmv.0 for ; Fri, 17 Jun 2016 10:53:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=sRTcgYs4rs15eDy3yacU06/IEvjLYIJppn8EG7o5cYk=; b=uNi7/CyG+1UyomchcwqJ9upQbvLPyGdzBY3PxJX0n4GnMibfodCm+HyeWqk68cKHXH GhleWykBS6JBUSmi8LhTvYIg6uIxAtmsAZ+KJ+TwAjIF3hUWZj95A+f8RO0rI7XmX2DI S9SxefEdzTLYRsVWYi9lAm/O0iefpG9IaGVFTAB23aJ6H3g1NV0cJq2lRGX7n0wvAMIU KP+JGCet7tryxuvnom51nA608uxINeu5khNL7/12QqUMiMU7qUhqz7mdOchTmZMxlxMp xsxgvG8ly6lXUkXu6vHZoBcZJHri2R6pew171jELlTkmrqj0GPaRRy/u5t0n2QOnPYKM uHMA== 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:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=sRTcgYs4rs15eDy3yacU06/IEvjLYIJppn8EG7o5cYk=; b=m1oGZMZIxjuPwc6NBT0oGh60AhL140lG9CMGUBl16NpXPMd0YZC+h10Rr9fZtg3btM ReFV01uMuRsQ5ftwqC3bfJ0EqZFeTavt2WAvSP1ZiLnimce2YZXU+6ztUK7RNJ+VQL+2 QBy3e2dT98cHaR5fBptPt1NboMNtJLnaXPZ5NIrZXTIvhUgb//Kq5DsczEJJcgUW/rlb QNsSq4GNCkjp8J7UnywhsOTD47YUadVYrxM9OXcr6Y2XWD0PC3yLeuUi8XEitn6AXioG uimI3Nx/wR1fLrThDBAg1XPPzS6dB7HC3o87O3omy8kDDFAnV1jaPlRl6Rr+h1fgGhBl gktQ== X-Gm-Message-State: ALyK8tK/BTXlaFGiry02zzxFiGD9oaK2Xe+dpo7O4M4XFxg8lp/ItotsMeFlePa8eRXSdPbo X-Received: by 10.28.54.134 with SMTP id y6mr807506wmh.96.1466186033690; Fri, 17 Jun 2016 10:53:53 -0700 (PDT) Received: from [192.168.0.83] (host86-169-85-169.range86-169.btcentralplus.com. [86.169.85.169]) by smtp.googlemail.com with ESMTPSA id db6sm49818949wjb.2.2016.06.17.10.53.53 for (version=TLSv1/SSLv3 cipher=OTHER); Fri, 17 Jun 2016 10:53:53 -0700 (PDT) To: toaster@yoctoproject.org References: <1466178552-3642-1-git-send-email-elliot.smith@intel.com> <1466178552-3642-2-git-send-email-elliot.smith@intel.com> From: Michael Wood Message-ID: <57643930.8090000@intel.com> Date: Fri, 17 Jun 2016 18:53:52 +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: <1466178552-3642-2-git-send-email-elliot.smith@intel.com> Subject: Re: [PATCH 2/2][v2] 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 17:53:56 -0000 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Thanks verified both setups firefox <47 and firefox 47 + wires/geckodriver. Patches applied to toaster-next and sent upstream to bitbake-devel. On 17/06/16 16:49, Elliot Smith wrote: > For the latest Firefox versions, WebDriver requires a download of a > separate binary and an additional capability to be defined on it. > > Modify our tests so that when "marionette" is set as the browser, > this capability is defined on the Firefox driver. Also add a note to the > README about the additional installation steps required. > > Signed-off-by: Elliot Smith > --- > bitbake/lib/toaster/tests/browser/README | 19 +++++++++++++++++-- > bitbake/lib/toaster/tests/browser/selenium_helpers.py | 5 +++++ > 2 files changed, 22 insertions(+), 2 deletions(-) > > diff --git a/bitbake/lib/toaster/tests/browser/README b/bitbake/lib/toaster/tests/browser/README > index f57154e..969f06c 100644 > --- a/bitbake/lib/toaster/tests/browser/README > +++ b/bitbake/lib/toaster/tests/browser/README > @@ -24,15 +24,30 @@ 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, you may need to install the Marionette driver, > +depending on how new your version of Firefox is. One clue that you need to do > +this is if you see an exception like: > > -The test case will instantiate a Selenium driver set by the > + selenium.common.exceptions.WebDriverException: Message: The browser > + appears to have exited before we could connect. If you specified > + a log_file in the FirefoxBinary constructor, check it for details. > + > +See https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette/WebDriver > +for installation instructions. Ensure that the Marionette executable (renamed > +as wires on Linux or wires.exe on Windows) is on your PATH; and use "marionette" > +as the browser string passed via TOASTER_TESTS_BROWSER (see below). > + > +(Note: The Toaster tests have been checked against Firefox 47 with the > +Marionette driver.) > + > +The test cases will instantiate a Selenium driver set by the > TOASTER_TESTS_BROWSER environment variable, or Chrome if this is not specified. > > Available drivers: > > * chrome (default) > * firefox > +* marionette (for newer Firefoxes) > * ie > * phantomjs > > diff --git a/bitbake/lib/toaster/tests/browser/selenium_helpers.py b/bitbake/lib/toaster/tests/browser/selenium_helpers.py > index 54db2e8..000937f 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 > > @@ -49,6 +50,10 @@ def create_selenium_driver(browser='chrome'): > ) > elif browser == 'firefox': > return webdriver.Firefox() > + elif browser == 'marionette': > + capabilities = DesiredCapabilities.FIREFOX > + capabilities['marionette'] = True > + return webdriver.Firefox(capabilities=capabilities) > elif browser == 'ie': > return webdriver.Ie() > elif browser == 'phantomjs':