|How to add nodes programmatically in Drupal 7|
|is element present||
Here is how to do it in webdriver:
|Create a Custom Entity/Node Title in Drupal 7||
|How to find and remove a value from an array||
If you are working with an array and you need to remove an item from the array, here is how to do it:
|Using Drupal AND Selenium for data driven testing||
This may sound a bit strange to many of you ... but, we have engineered a way to create a framework for managing scheduled selenium launches, and providing data into each launch (data driven) using a Content Management System (Drupal).
|Finding a available port number in Windows||
See the following page for some clever code for finding an available port number in Windows to start an instance of the selenium server. This is handy when you are trying to start multiple instances of selenium and need port numbers that are not in use.
|Selenium RC Command LIne Help||
Type the following command on the command prompt to get a list of arguements the Selenium server command line supports
|DRUPAL: How to use Rules to create child nodes from parent and populate child fields from parent fields||
I use the Drupal content management system as a companion to the Selenium automation tools so that I get robust reporting and data manipulation. I also use it to perform parameterized data driven test scripts.
|Select a check-box where the label contains text||
Here was the GUI:
Here was the code behind:
|Storing results into an array and writing them to a form later||
Here is how I am storing results into an array to read them in a test case at the end of the suite:
Here is how I call the data later and write to a report web form:
|How to create a basic PHP-based web service||
I borrowed from this page (http://davidwalsh.name/web-service-php-mysql-xml-json) information on how to create a basic PHP web-service. See the attached/modified version.
|How to write data to a database||
Attached are two files used as an example of how to write data to a MySQL database using HTML/PHP.
runScript | window.home();
|Selenium Server Help Command||
Here is the syntax for having the selenium server return help from the command line: java -jar selenium-server-standalone-2.42.2.jar -h
Here is the output from version 2.42.2:
Usage: java -jar selenium-server.jar [-interactive] [options]
|Turn OFF window.alert in Firefox||
|How to Parameterize and Loop a Batch File||
Here is an example of how to parameterize a Selenium RC batch file, and loop through launching whatever number of instances you specify to the command line:
|How to round up to the next whole value||
|How to Simulate ENTER key||
Here is a way to simulate hitting the enter key after you have gained focus of the field:
|How to call user-extensions in webdriver||
Found an article that indicates to:
|RC Browser Commands||
|Compare the value of two variables||
Here is the code I used to compare a variable to an array of values stored in another variable:
|Selenium 1 RC API Document|
|Performance Timing with the IDE||
The values are in milliseconds since 1/1/1970
This is useful for testing AJAX elements have returned:
|Turning off the automatic update on Firefox||
I recently experienced an issue where Firefox was automatically trying to force an update of Flash even though I had automatic update turned off.
|Get Tomorrows Date||
Here is a code snippet of how to get tomorrows date:
|How to use multiple Firefox profiles at the same time||
You can run more than one Firefox profile at one time.
You first need to create a new profile. You need to run the following in the run dialog or command prompt: C:\Program Files\Mozilla Firefox\firefox.exe -profilemanager
|Selenium Commands with Examples||
This page is awesome and has a list of all Selenium commands with a link to a page with an example: http://software-testing-tutorials-automation....
|Using gotoIf AND contains||
Here is how you would use a gotoIf where a variable contains a text string:
|Add Variables to the User-Extensions.js file||
This article shows you how to add variables to the user-extensions.js file for use in your tests. You have to declare a function first, then call that function in your test to access the varaibles.This method can be used in both the IDE and RC versions of the user-extension file.
|Selenium Server Command Line Options||
|Selenium Command Reference||
|How to store time||
Here is an example of how to store the Unix Epoch time for any number of reasons:
You can you this to: