title | layout |
---|---|
(GUI notes/tips) |
default |
{% include links %}
- TOC {:toc}
These notes are about usability of Selenium IDE GUI. See also Selenium IDE documentation. See ClassicSelenese and EnhancedSelenese regarding Selenese syntax. If you develop [scripts][script], frameworks or plugins, see also DevelopmentTools.
When saving a [suite], Selenium IDE doesn't add '.html'
extension. So, add .html
yourself, which will let you identify the file more easily.
At start, Selenium IDE can open the most recent suite (or case). However,
- you need to enable Options > General > 'Activate developer tools'
- when it starts with the most recent suite, it won't show the suite name in the window title. TODO report & add to ThirdPartyIssues
Currently disabled. See Components > Hands-on GUI. The goal is to enable
- in-place editing of Selenese commands/comments and their parameters (
target
andvalue
), right in the commands list - productivity keyboard shortcuts
You can edit commands/comments 'in place' by clicking at them (where they are listed). In order to edit 'in place'
- click at a cell, or
- select a row (more below), then hit
Enter
orI
orM
, or - edit another cell, then hit
TAB
orShift+TAB
.
After you select a row, you can use key shortcuts I
and M
to insert new command and comment, respectively, and to edit it 'in place'. (Similarly, pressing I
or M
in right click context menu goes to edit 'in place'). If using with 'Clipboard And Indent', when you start to type new a command/comment, it already has the initial indentation based on the previous command/comment.
'Command' cell (of commands, i.e. non-comments) operates with autocomplete dropdown. Long comments overflow to the right. 'Target' cell (of commands, i.e. non-comments) overflows to the right (if there is nothing in 'Value' cell), which lets you see long selectors.
Components > Clipboard And Indent enables clipboard sharing between Selenium IDE and other applications. Otherwise Selenium IDE doesn't accept Selenese commands/comments passed through clipboard from another Selenium IDE instance when using multiple Selenium IDEs in parallel.
It supports Selenese commands/comments to be indented with spaces into blocks, through menu or by pressing right or left arrow. It automatically indents and unindents structured commands that come with SelBlocks Global. It also indents logs.
When saving cases (as HTML), it transforms comments from HTML comments to table cells (with class="comment"
). That brings three benefits:
- When you open a case in a browser, the comments show up.
- It allows
--
and special characters in comments. - You can compare changes in your cases with HTML diff tool DaisyDiff ( see also its wiki).
This feature is backwards compatible, but not forward compatible. Once you save a case with Clipboard And Indent, it can be open only with Clipboard And Indent. To use this functionality, install Clipboard And Indent (or better, whole SeLite). Start Selenium IDE and close it. Only then it activates.
A running Firefox instance can show only one standard Selenium IDE window. Yet, viewing/editing different [cases][case] in multiple Selenium IDE windows (at the same time) increases productivity. It's beneficial for restructuring scripts (e.g. into Selenese functions), or as a reference for cases. Several ways exist for it, varying in intuitiveness, simplicity and accessibility. Some involve multiple running instances of Firefox, with separate profiles.
For robust access modify all cases and [suites][suite] only in primary Selenium IDE window. Alternatively, edit different cases (or sets of them) in different Selenium IDEs. Either way, beware that sometimes other Selenium IDEs don't pick up the change when saved (even if you switch between cases in those other Selenium IDEs) or they notice it only later. So if you modify a [case] in one chosen Selenium IDE and you use other Selenium IDEs as its read-only reference, it may be out of date.
This shows one (standard) Selenium IDE detached from Firefox browser windows. Other Selenium IDEs are inside browser windows, but they may look standard, too. Compared to the next method, this
- (+) is simpler to set up, to start and to maintain
- (+) involves less maintenance: it runs only one Firefox instance (with one profile)
- (+) is more convenient: shared bookmarks, window history, add-ons etc.
- (+-) shares history of recent files in Selenium IDE; however, it gets overwritten by the instance closed as the last one
- (-) can't run scripts in auxiliary Selenium IDEs (they target their own window/tab). If you modify a script there without saving it and your run a command that changes the current page, your changes will be lost! So you should use auxiliary Selenium IDEs primarily to view scripts (for reference). Auxiliary Selenium IDEs don't load any SettingsManifests neither any Settings sets associated with [suites][suite]. (That prevents potential conflicts due to the fact that all auxiliary Selenium IDEs share [Core scope] along with the standalone Selenium IDE, if any). Therefore they don't load any extensions through Bootstrap, either.
Steps
- Install Stylish
- Install Hide Tab Bar With One Tab
- Install Hide Navigation Bar (for usage see below)
- Install per-tab coloured menu text:
- Restart Firefox
- Start standalone Selenium IDE (by Ctrl+Alt+S, or Firefox menu Tools > Selenium IDE)
- Display auxiliary Selenium IDEs. For each
- open a new Firefox window
- open one of {{chromeUrl}}s
- chrome://selenium-ide/content/selenium-ide.xul#GREEN
- chrome://selenium-ide/content/selenium-ide.xul#BLUE
- chrome://selenium-ide/content/selenium-ide.xul#RED
- chrome://selenium-ide/content/selenium-ide.xul#WHITE
- if you have already opened chrome://selenium-ide/content/selenium-ide.xul and later you add or change the hash part (#GREEN, #BLUE, #RED or #WHITE), it won't take effect (even after you hit Enter) until you refresh the URL e.g. by F5 key (which will lose any modifications)
- hide Firefox navigation bar by pressing F2 (you may need to press it twice)
- (+-) it applies to the current window and any new windows later, but not to other existing Firefox windows
- (-) however, after a Firefox restart it applies to all windows; then press F2 to show navigation bar where you want it
In auxiliary IDEs
- Alt key opens Selenium IDE menu, not Firefox menu. However, if you are not running Firefox in full screen mode (F11), then pressing Alt again opens Firefox menu.
- (-) if you hide Firefox menu, then Alt key won't open it.
- (-) don't call
alert()
orconfirm()
fromgetEval
- (+) optionally, press F11 for full screen mode
- (-) pressing F5 (which reloads Selenium IDE), or closing Selenium IDE tab/window with 'x' icon, applies without any confirmation about unsaved case(s) or suite! The safest way is not to modify scripts in auxiliary IDEs.
Side note: There is also Firefox menu > View > Sidebar > Selenium IDE. However, that Selenium IDE sidebar has restricted width. Like Auxiliary Selenium IDEs, Selenium IDE in a sidebar doesn't load any SettingsManifests, any Settings sets, neither any extensions through Bootstrap. Please, vote at ThirdPartyIssues > Sidebars (history, bookmarks) should not have maximum width so that it gets fixed.
This shows multiple Selenium IDEs, detached from Firefox browser windows. Compared to the previous method, this
- (-) needs multiple running Firefox instances (and profiles). Each profile each needs an installation of Selenium IDE; ones that run scripts also need their own installations of SeLite Components and any other extensions.
- (+) can run multiple scripts in parallel with separate sessions (cookies)
To set up
- Create Firefox profiles, one per Selenium IDE: Follow Setting up extension development environment (MDN) > Development profile.
- Start multiple Firefox instances, one per profile, with command line parameters
-no-remote
and (-P ProfileName
). - Install Selenium IDE in each profile. Install SeLite Components any other extensions in profiles where you will run scripts.
- Mark the second and successive profiles to identify Selenium IDEs:
- Visually by menu text colour
- Install Stylish
- Restart Firefox
- Install styles for the second and further Selenium IDEs:
- You can switch between styles in Firefox menu Tools > Add-ons > User Styles.
- By language (this applies to the whole Firefox instance, rather than just Selenium IDE, which can make it difficult to use!)
- Install Simple Locale Switcher
- Restart Firefox
- Install different language packs through Firefox toolbar > 'Simple Locale Switcher' green button > 'Get more language packs...'