FAQ expecco en
Aus ExpeccoWiki
Inhaltsverzeichnis |
expecco General
My settings seem to be lost when I restart expecco ?
- Settings are only applied to the current session. To make them persistent, click on the "Save" Button (at the lower left of the settings dialog). Then, settings are stored in a file named ".expeccoPreferences" in your user folder. This file can be transported to other machines if you like.
expecco web
Replay
Why can some pages not be loaded?
- Check for a correct value of the urlToTest environment variable. It must be set to the URL of the checked site.
Why is my HTTPS-page or page using frames not loaded correctly?
- A test can be executed on different browsers, using different browser settings (firefox, iexplore, chrome, iehta). You find these settings in the variables-environment of the testsuite. For HTTPS and/or pages using frames, try to use iehta and chrome instead of iexplore or firefox. These are more tolerant with respect to security checks and security settings.
After a click-event for a link, it does not wait for the page to be loaded. What can I do?
- Try replacing the >click< by a >clickAndWait<. Depending on timing variations during the capture, Selenium confuses these two sometimes, not knowing when a click is related to a page load. The reverse is also true sometimes, making selenium wait for a page which never appears. In this case, replace the >clickAndWait< by a >click<.
Capture
I cannot import the capture into expecco?
- Occasionally, the connection between the two programs seems to be lost. To not loose your capture, save it manually (in the Selenium IDE) into a file. Save it in HTML-format with an "html" file suffix. ("File - Save Test Case As..." ). Back in expecco, import the file via the plugin menu item: "Extras - Plugins - Webtest - Import Selenium-Capture - HTML Script...".
Then, please close the Selenium IDE and the corresponding browser before trying a new recording (to get a new connection). The communication usually works ok afterwards. If the problem persists, contact the exept service department.
Is it possible to make a screenshot?
- You will find the Log ScreenDump block, which does exactly that.
What does framesupport mean?
- Frames are areas in a web-page into which contents from other locations can be displayed. As this has certain security-related implications (and is also incorrectly implemented in some browser versions), these are special environment variable settings related to this.
You can switch from frameless to framemode via the "seleniumServerMode" variable. If in doubt, set it to "frameSupport".
Selenium IDE
Can I download updates for the Selenium IDE ?
- We made a few changes and added the expecco import connection to the Selenium IDE, which could make updates from openQA.org incompatible. You may want to give it a try, but make a backup copy before doing so. You will also get these updates from exept, when an upgrade version is available. We try hard to keep the Selenium IDE uptodate.
The Selenium IDE is not appearing in the Firefox Browser. What can I do?
- In the Firefox browser, click on View/Ansicht ► Sidebar ► Selenium IDE or, to open the Selenium IDE as a separate window, select Extras ► Selenium IDE. You can also reopen the Selenium IDE in case you closed it due to a wrong click.
Browser
Which browsers are supported?
- For replay in combination with the Selenium IDE, all javascript-capable browsers like Internet Explorer, Firefox oder Opera are supported. Actually, the web-features completely depend upon what Selenium support - so it will also be the same set as supported by a pure Selenium IDE installation. Recordings are (currently) only possible using Mozilla Firefox.
Why am I asked to clear my private data when finishing a session?
- The data in question is not the stuff from your personal firefox profile. Instead, expecco creates a special, private profile when starting up firefox, which should not interfere with your personal settings. All such data is cleared, to prevent errors and invalid behavior in the next session. For example, to ensure that the same set of cookies, history etc. is present the next time. You can deactivate this in the profile by unchecking the mark in "Extras ► Settings ► Security ► Clear Private Data when Finishing Firefox"
Expecco Access to Java Swing GUI Objects
The expecco java swing plugin uses the Java accessibility package for access to the related Java Swing GUI Objects.
Expecco has access to all objects with an accessible context.
To identify these objects it is recommended to give the objects an unique id.
You can do this in the following way.
Use the method getAccessibleContext() to get the accessible context for a object. Then you can give this object an unique name using the method setAccessibleName("Unique ID").
Example
JButton buttonTest = new JButton("Test");
buttonTest.getAccessibleContext().setAccessibleName("TestButton");
Documentation
getAccessibleContext()
Returns the AccessibleContext associated with this object. In most cases, the return value should not be null if the object implements interface Accessible. If a component developer creates a subclass of an object that implements Accessible, and that subclass is not Accessible, the developer AccessibleContext should override the getAccessibleContext method to return null.
Field Summary of AccessibleContext
ACCESSIBLE_ACTION_PROPERTY
Constant used to indicate that the supported set of actions has changed.
ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY
Constant used to determine when the active descendant of a component has changed.
ACCESSIBLE_CARET_PROPERTY
Constant used to determine when the accessibleText caret has changed.
ACCESSIBLE_CHILD_PROPERTY
Constant used to determine when Accessible children are added/removed from the object.
ACCESSIBLE_COMPONENT_BOUNDS_CHANGED
PropertyChangeEvent which indicates that a change has occurred in a component's bounds.
ACCESSIBLE_DESCRIPTION_PROPERTY
Constant used to determine when the accessibleDescription property has changed.
ACCESSIBLE_HYPERTEXT_OFFSET
Constant used to indicate that a hypertext element has received focus.
ACCESSIBLE_INVALIDATE_CHILDREN
PropertyChangeEvent which indicates that a significant change has occurred to the children of a component like a tree or text.
ACCESSIBLE_NAME_PROPERTY
Constant used to determine when the accessibleName property has changed.
ACCESSIBLE_SELECTION_PROPERTY
Constant used to determine when the accessibleSelection has changed.
ACCESSIBLE_STATE_PROPERTY
Constant used to determine when the accessibleStateSet property has changed.
ACCESSIBLE_TABLE_CAPTION_CHANGED
Constant used to indicate that the table caption has changed. The old value in the PropertyChangeEvent will be an Accessible representing the previous table caption and the new value will be an Accessible representing the new table caption.
ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED
Constant used to indicate that the column description has changed The old value in the PropertyChangeEvent will be null and the new value will be an Integer representing the column index.
ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED
Constant used to indicate that the column header has changed The old value in the PropertyChangeEvent will be null and the new value will be an AccessibleTableModelChange representing the header change.
ACCESSIBLE_TABLE_MODEL_CHANGED
Constant used to indicate that table data has changed.
ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED
Constant used to indicate that the row description has changed The old value in the PropertyChangeEvent will be null and he new value will be an Integer representing the row index.
ACCESSIBLE_TABLE_ROW_HEADER_CHANGED
Constant used to indicate that the row header has changed The old value in the PropertyChangeEvent will be null and the new value will be an AccessibleTableModelChange representing the header change.
ACCESSIBLE_TABLE_SUMMARY_CHANGED
Constant used to indicate that the table summary has changed The old value in the PropertyChangeEvent will be an Accessible representing the previous table summary and the new value will be an Accessible representing the new table summary.
ACCESSIBLE_TEXT_ATTRIBUTES_CHANGED
PropertyChangeEvent which indicates that text attributes have changed.
ACCESSIBLE_TEXT_PROPERTY
PropertyChangeEvent which indicates that text has changed.
ACCESSIBLE_VALUE_PROPERTY
Constant used to determine when the accessibleValue property has changed.
ACCESSIBLE_VISIBLE_DATA_PROPERTY
Constant used to determine when the visual appearance of the object has changed.
accessibleDescription
A localized String containing the description of the object.
accessibleName
A localized String containing the name of the object.
accessibleParent
The accessible parent of this object.
SetAccessibleName("Name")
Sets the accessible name of an object
SetAccessibleDescription("Description")
Sets the accessible description of an object
Code Example
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.accessibility.AccessibleContext;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
public class MainClass extends JFrame implements ActionListener {
JButton jb;
MainClass(String title) {
super(title);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
AccessibleContext ac = getAccessibleContext();
ac.setAccessibleDescription("Accessibility Demo1 description.");
ac = getRootPane().getAccessibleContext();
ac.setAccessibleName("Root pane");
ac.setAccessibleDescription("Root pane description");
ac = getGlassPane().getAccessibleContext();
ac.setAccessibleName("Glass pane");
ac.setAccessibleDescription("Glass pane description");
ac = getLayeredPane().getAccessibleContext();
ac.setAccessibleName("Layered pane");
ac.setAccessibleDescription("Layered pane description");
ac = getContentPane().getAccessibleContext();
ac.setAccessibleName("Content pane");
ac.setAccessibleDescription("Content pane description");
JPanel p = new JPanel();
ac = p.getAccessibleContext();
ac.setAccessibleName("Panel");
ac.setAccessibleDescription("Panel description");
jb = new JButton("Press Me");
jb.addActionListener(this);
jb.setToolTipText("Press me for accessibility information.");
p.add(jb);
getContentPane().add(p);
setSize(200, 75); setVisible(true); }
public void actionPerformed(ActionEvent e) {
dumpInfo(getAccessibleContext());
}
void dumpInfo(AccessibleContext ac) {
System.out.println("Name = " + ac.getAccessibleName());
System.out.println("Description = " + ac.getAccessibleDescription());
int nChildren = ac.getAccessibleChildrenCount();
for (int i = 0; i < nChildren; i++)
dumpInfo(ac.getAccessibleChild(i).getAccessibleContext());
}
public static void main(String[] args) {
new MainClass("Accessibility Demo1");
}
}
More Infos to javax.accessibility
Package javax.accessibility
Defines a contract between user-interface components and an assistive technology that provides access to those components. If a Java application fully supports the Java Accessibility API, then it should be compatible with, and friendly toward, assistive technologies such as screen readers, screen magnifiers, etc. With a Java application that fully supports the Java Accessibility API, no screen reader off screen model would be necessary because the API provides all of the information normally contained in an off screen model.
The Java Accessibility API package consists of 8 Java programming language interfaces, and 6 Java programming language classes. These are described below.
Interface Accessible
Interface Accessible is the main interface of the Java Accessibility API. All components that support the Java Accessibility API must implement this interface. It contains a single method, getAccessibleContext, that returns an instance of the class AccessibleContext. Sun thinks that implementing this interface is the absolute minimum requirement of every object that is part of the user interface of a Java application, if that program is to be compatible with assistive technologies.
Class AccessibleContext
AccessibleContext represents the minimum information all accessible objects return and is obtained by calling the getAccessibleContext method on an object that implements the Accessible interface. This information includes the accessible name, description, role, and state of the object, as well as information about the parent and children of the object. In addition, JavaBeans TM property change support is also included to allow assisitive technologies learn when the values of the accessible properties change. AccessibleContext also contains methods for obtaining more specific accessibility information about a component. If the component supports it, these methods will return an object that implements one or more of the following interfaces:
- AccessibleAction The object can perform one or more actions. This interface provides the standard mechanism for an assistive technology to determine what those actions are and tell the object to perform those actions. Any object that can be manipulated should return an object that implements this interface when the getAccessibleAction method is called on an AccessibleContext.
- AccessibleComponent The object has a graphical representation. This interface provides the standard mechanism for an assistive technology to determine and set the graphical representation of the object. Any object that is rendered on the screen should return an object that implements this interface when the getAccessibleComponent method is called on an AccessibleContext.
- AccessibleSelection The object allows its children to be selected. This interface provides the standard mechanism for an assistive technology to determine the currently selected children as well as modify the selection set. Any object that has children that can be selected should return an object that implements this interface when the getAccessibleSelection method is called on an AccessibleContext.
- AccessibleText The object presents editable textual information on the display. This interface provides the standard mechanism for an assistive technology to access that text via its content, attributes, and spatial location. Any object that contains editable text should return an object that implements this interface when the getAccessibleText method is called on an AccessibleContext.
- AccessibleHypertext The object presents hypertext information on the display. This interface provides the standard mechanism for an assistive technology to access that hypertext via its content, attributes, and spatial location. Any object that contains hypertext should return an object that implements this interface when the getAccessibleText method is called on an AccessibleContext.
- AccessibleValue The object supports a numerical value. This interface provides the standard mechanism for an assistive technology to determine and set the current value of the object, as well as the minimum and maximum values. Any object that supports a numerical value should return an object that implements this interface when the getAccessibleValue method is called on an AccessibleContext.
Class AccessibleRole
This class encapsulates the Accessible object's role in the user interface and is obtained by calling the getAccessibleRole method on an AccessibleContext. Accessible roles include "Check box", "Menu Item", "Panel", etc. These roles are identified by the constants in this class such as AccessibleRole.CHECK_BOX, AccessibleRole.MENU_ITEM, and AccessibleRole.PANEL.
The constants in this class present a strongly typed enumeration of common object roles. A public constructor for this class has been purposely omitted and applications should use one of the constants from this class. Although this class pre-defines a large list of standard roles, it is extensible so additional programmer-defined roles can be added in the future without needing to modify the base class.
Class AccessibleState
This class encapsulates a particular state of the Accessible object. Accessible states include things like "Armed", "Busy", "Checked", "Focused", etc. These roles are identified by the constants in this class such as AccessibleState.ARMED, AccessibleState.BUSY, AccessibleState.CHECKED, and AccessibleState.FOCUSED. The sum of all the states of an Accessible object is called the AccessibleStateSet, and can be obtained by calling the getAccessibleStateSet method on an AccessibleContext.
The constants in this class present a strongly typed enumeration of common object roles. A public constructor for this class has been purposely omitted and applications should use one of the constants from this class. Although this class pre-defines a large list of standard roles, it is extensible so additional, programmer-defined roles can be added in the future without needing to modify the base class.
Class AccessibleStateSet
This class encapsulates a collection of states of the Accessible object and is obtained by calling the getAccessibleStateSet method on an AccessibleContext. Since an object might have multiple states (e.g. it might be both "Checked" and "Focused"), this class is needed to encapsulate a collection of these states. Methods in the class provide for retrieving the individual AccessibleStates on the state set.
Class AccessibleBundle
This class is used to maintain a strongly typed enumeration. It is the super class of both the AccessibleRole and AccessibleState classes. Programmers normally do not interact with this class directly, but will instead use the AccessibleRole and AccessibleState classes.
Interface AccessibleAction
The AccessibleAction interface should be supported by any object that can perform one or more actions. This interface provides the standard mechanism for an assistive technology to determine what those actions are as well as tell the object to perform those actions. Any object that can be manipulated should support this interface.
Applications can determine if an object supports the AccessibleAction interface by first obtaining its AccessibleContext (see Accessible) and then calling the getAccessibleAction method of AccessibleContext. If the return value is not null, the object supports this interface.
Interface AccessibleComponent
The AccessibleComponent interface should be supported by any object that is rendered on the screen. This interface provides the standard mechanism for an assistive technology to determine and set the graphical representation of an object.
Applications can determine if an object supports the AccessibleComponent interface by first obtaining its AccessibleContext (see Accessible) and then calling the getAccessibleComponent method of AccessibleContext. If the return value is not null, the object supports this interface.
Interface AccessibleSelection
The AccessibleSelection interface provides the standard mechanism for an assistive technology to determine what the current selected children are, as well as modify the selection set. Any object that has children that can be selected should support this the AccessibleSelection interface.
Applications can determine if an object supports the AccessibleSelection interface by first obtaining its AccessibleContext (see Accessible) and then calling the getAccessibleSelection method of AccessibleContext. If the return value is not null, the object supports this interface.
Interface AccessibleText
Interface AccessibleText is the contract for making rich, editable text Accessible. Not all text displayed on the screen is rich and editable (e.g. text contained in buttons, labels, menus, etc., which users aren't expected to manipulate). However, objects containing editable text must implement interface AccessibleText if they are to interoperate with assistive technologies.
This interface provides support for going between pixel coordinates and the text at a given pixel coordinate, for retrieving the letter, word, and sentence at, before, or after a given position in the text. This interface provides support for retrieving the attributes of the character at a given position in the text (font, font size, style, etc.), as well as getting the selected text (if any), the length of the text, and the location of the text caret.
Applications can determine if an object supports the AccessibleText interface by first obtaining its AccessibleContext (see Accessible) and then calling the getAccessibleText method of AccessibleContext. If the return value is not null, the object supports this interface.
Interface AccessibleHypertext
The AccessibleHypertext interface should be supported by any object that presents hypertext information on the display. This interface provides the standard mechanism for an assistive technology to access that text via its content, attributes, and spatial location. It also provides standard mechanisms for manipulating hyperlinks. Applications can determine if an object supports the AccessibleHypertext interface by first obtaining its AccessibleContext (see Accessible) and then calling the AccessibleContext.getAccessibleText() method of AccessibleContext. If the return value is a class which extends AccessibleHypertext, then that object supports AccessibleHypertext.
Interface AccessibleHyperlink
An object that is a hyperlink should support the AccessibleHyperlink interface. An object that implements this interface will be returned by calling the getLink method on an AccessibleHypertext object.
Interface AccessibleValue
The AccessibleValue interface should be supported by any object that supports a numerical value (e.g., a scroll bar). This interface provides the standard mechanism for an assistive technology to determine and set the numerical value as well as get the minimum and maximum values.
Applications can determine if an object supports the AccessibleValue interface by first obtaining its AccessibleContext (see Accessible) and then calling the getAccessibleValue method of AccessibleContext. If the return value is not null, the object supports this interface. @since 1.2
Misc
Can I write my own elementary blocks using the expecco webEdition?
- No, the webEdition is a stripped down version which focuses on the composition of test scenarios beased on a set of predefined existing blocks from the two included libraries: the Standard- and the Seleniumlibrary. You cannot create new elementary blocks in this program. The expecco developer version allows for blocks to be defined using JavaScript- or Smalltalk-code. See a comparison of the different versions and their feature lists: http://www.exept.de/en/products/expecco/features