Filed under Mobile Testing, UI Testing.

Why should I schedule a “Mobile Emulation” test to run every hour or every day?

The answer is very simple: during the course of the development or even after the development is finished when changes are still done to the product is good to check how your application displays every day and put the running test on a dashboard, on a monitor or on a display in front of the product owners etc.

This process will make every change visible to the development teams, product managers and product owners.

How do I schedule my test ?

mobile-emulation-new-test-schedule
    • On the test edit page on the lower side of the page you will find a drop down in which you can select how often should the test run – like in the image below
mobile-emulation-schedule-list
  • Choose the period and click “Save for later”
  • This is it. Now your test will run every time according to the selected period.

 

LoadFocus.com is a All-In-One Cloud Testing Platform for Load Testing and Performance Testing, Website Speed Testing, Automated Website Testing and Mobile Emulation for Websites, Mobile Applications and API Endpoints.

Filed under Automated Website Testing & Monitoring, Selenium WebDriver, Test Automation, UI Testing.

Most of the Automated UI Selenium WebDriver test are very slow comparing to Unit Tests and API tests and one of the factors is how fast WebDriver can find elements within the HTML of a web page.
Also, using the right locator ensures your tests are faster, more reliable and have a lower maintenance over releases.

Finding web elements with Selenium WebDriver by ID is usually the fastest option, but here is the list of the best and fastest selectors Selenium WebDriver Tests run faster:

  1. ID selectors (By.ID – Matches by @id attribute)
    • IDs are the safest, fastest locator option and should always be your first choice
    • IDs should be unique in every page according to W3C website
    • even if the DOM changes, if the ID is still there, then WebDriver can still locate it
    • always try and get extra IDs added into the code, this makes testers life easier
    • fastest locator as it uses the document.getElementById() javascript command which is optimised by many browsers
  2. CSS and Name selectors (Matches by CSS selector or @name attribute)

    • faster than XPath
    • whenever IDs are not available/ usable, usually @name can be used to identify elements
    • CSS and XPath locators are very similar
    • not very flexible in identifying elements comparing to XPath
  3. XPath locators (Matches with arbitrary XPath expression)
    • most flexible in order to build reliable web element locators
    • very slow locator (particularly in IE) since in order to locate the element it needs to traverse the whole DOM of the page which is a time consuming operation
    • check here how to identify and validate XPath locators inside Chrome Developer Tool, also you can install a Firebug extension to be able to identify and validate XPaths easily with FirePath from FireBug (adds a development tool to edit, inspect and generate XPath 1.0 expressions, CSS 3 selectors and JQuery selectors)