Home / Companies / Sauce Labs / Blog / February 2011

February 2011 Summaries

2 posts from Sauce Labs

Filter
Month: Year:
Post Summaries Back to Blog
To use Selenium with PHPUnit on Sauce, you need to download and install the pear package manager for PHP. Depending on your operating system, you can do this by installing mac ports for Mac, using apt-get for Linux or Windows, and following specific instructions for each OS. Once installed, you'll upgrade pear, discover and update channels, and then install PHPUnit_Selenium_SauceOnDemand. After that, you'll configure the package to use your Sauce Labs account and access key. Finally, you can run tests with PHPUnit, using an example script as a starting point. With these steps, you'll be able to test your website with Selenium on Sauce OnDemand.
Feb 28, 2011 594 words in the original blog post.
In Selenium testing, synchronization is a common problem that can be solved using various techniques. With the shift from Web 1.0 to Web 2.0, clicking a link no longer guarantees a page load due to AJAX's asynchronous nature. As a result, developers use `waitForPageToLoad` and its variants in older browsers or `isElementPresent`, `isVisible`, and `available` conditions in newer browsers. However, when dealing with complex AJAX interactions, the `latch` technique is employed as a synchronization method of last resort. This involves setting a value in the browser's DOM that is monitored by the script for synchronization, such as the `window.latch` variable in Ruby on Rails. The `waitForCondition` command can then be used to wait for this condition being met, allowing developers to automate complex interactions with Web 2.0 applications.
Feb 08, 2011 431 words in the original blog post.