Selenium(Copy URL in PhpBB Forum Format - Info)
A comparison of iMacros and Selenium features, methods and commands.
This page is work in progress and not complete (yet).
Things Selenium can do but not iMacros
- Safari support (run tests, no IDE)
- Opera support (run tests, no IDE)
- Generate code (iMacros has a different approach. iMacros is an encapsulated object that can be called from any language)
Things iMacros can do but not Selenium
- Full AJAX support (e.g sliders as in http://maps.google.com/ and Drag & Drop support)
- Automate and test Flash, Flex, Silverlight and Java applets
- Automate Web Page Dialogs
- Use image recognition to find page elements
- Take Screenshots, save websites
- Automate and test file up- and downloads
- Web Scripting Interface (COM object) for integration with any Windows programming or scripting language (view sample code). Selenium takes the different approach of generating code.
- Data Extraction support
- Free and commercial editions, royalty-free distribution. The commercial license includes free Silver Level tech support, so our support team is ready to help you with your project.
Essential features both applications have
- Fully documented commands and specification
- Test scripts can be easily edited
- Single-step debugging
- Unicode support
- Remote Control
- Active user forums
- Available for Firefox 2/3.
- Available for Firefox 2/3
- Available for Internet Explorer 6/7/8
|TAG||clickAndWait||Selenium uses "target" values to define an element, iMacros uses the TAG command's POS, TYPE and ATTR attributes.|
|TAG||type||iMacros uses the optional CONTENT field of the TAG command for entering text|
|FRAME||selectFrame||iMacros uses the frame number instead of frame name|
Selenium commands come in three 'flavors': Actions, Accessors and Assertions. Each command call is one line in the test table of the form:
command target value
iMacros commands are structured similarly, but that the target part consists of three attributes:
command pos type attr value
Actions are commands that generally manipulate the state of the application. They do things like "click this link" and "select that option". If an Action fails, or has an error, the execution of the current test is stopped.
Selenium: Many Actions can be called with the "AndWait" suffix, e.g. "clickAndWait". This suffix tells Selenium that the action will cause the browser to make a call to the server, and that Selenium should wait for a new page to load.
iMacros uses the TAG command for this and automatically detects if a command triggers a call to the server and it has to wait. Therefore it does not need an equivalent to "AndWait".
Selenium: Accessors examine the state of the application and store the results in variables, e.g. "storeTitle". They are also used to automatically generate Assertions.
iMacros uses its data extraction features for this. For data extraction the "value" parameter is replaces with the extract paramenter
command pos type attr extract=<type>
Selenium: Assertions are like Accessors, but they verify that the state of the application conforms to what is expected. Examples include "make sure the page title is X" and "verify that this checkbox is checked".
iMacros: All TAG commands are automatically assertions so no special command is required. For the rare case that you want to ignore errors, use SET !ERRORIGNORE YES
Selenium: All Selenium Assertions can be used in 3 modes: "assert", "verify", and "waitFor". For example, you can "assertText", "verifyText" and "waitForText". When an "assert" fails, the test is aborted. When a "verify" fails, the test will continue execution, logging the failure. This allows a single "assert" to ensure that the application is on the correct page, followed by a bunch of "verify" assertions to test form field values, labels, etc.
"waitFor" commands wait for some condition to become true (which can be useful for testing Ajax applications). They will succeed immediately if the condition is already true. However, they will fail and halt the test if the condition does not become true within the current timeout setting (see the setTimeout action below).
iMacros: The TAG command automatically uses "assert" and "waitfor" mode as this is the option you will need in 95% of all cases. The "waitfor" time is controlled by the timeout value. If you prefer to use a behavior like Selenium "verify", then add SET !ERRORIGNORE YES to the macro. Then the test will continue execution, only logging the failure.
Selenium: Element Locators tell Selenium which HTML element a command refers to. Many commands require an Element Locator as the "target" attribute. Examples of Element Locators include "elementId" and "document.forms.element".
iMacros: The iMacros element locator is the TAG command. It splits the element location in 3 parts:
- POS=x : x-th matching element
- TYPE=y : The type (A, B, FONT,...)
- ATTR= : The attributes that specify the element further, such as HREF, TXT or ID.
Selenium has a huge number of of assertions: assertErrorOnNext, assertFailureOnNext, assertNotFailureOnNext, verifyErrorOnNext, verifyNotErrorOnNext, verifyFailureOnNext, verifyNotFailureOnNext, waitForErrorOnNext, waitForNotErrorOnNext, waitForFailureOnNext, waitForNotFailureOnNext, assertSelected, assertSelectedLabel, assertSelectedValue, assertSelectedIndex, assertSelectedId, assertNotSelected, verifySelected, verifyNotSelected, waitForSelected waitForNotSelected
iMacros: All assertions are done automatically by the TAG command in iMacros. Any encountered error is logged and/or reported via the Scripting Interface iimPlay command. See also How can I search for a keyword?.
Selenium has a huge number of of "store" commands: storeAlert, storeAllButtons, storeAllFields, storeAllLinks, storeAttribute, storeBodyText, storeConfirmation, storeCursorPosition, storeElementHeight, storeElementIndex, storeElementPositionLeft, storeElementPositionTop, storeElementWidth, storeLocation, storePrompt, storeSelectedId, storeSelectedIds, storeSelectedIndex, storeSelectedIndexes, storeSelectedLabel, storeSelectedLabels, storeSelectedValue, storeSelectedValues, storeSelectOptions, storeTable, storeText, storeTitle, storeValue, storeAlertPresent, storeChecked, storeConfirmationPresent, storeElementPresent, storeOrdered, storePromptPresent, storeSomethingSelected, storeTextPresent, storeVisible
iMacros: All this information (and more) can be saved via the web data extraction feature
Note: We see this page as documentation to help you find the best possible tool for your task. If you find any mistakes or missing information please notify us or simply edit the page yourself.