hover(testCase,comp) performs
a hover gesture on the UI component comp that supports this gesture.
hover(testCase,comp,location)
specifies the location to hover at within the component. If you do not specify the location,
MATLAB® hovers at the center of comp.
Test case, specified as a matlab.uitest.TestCase object.
Component to hover on during test, specified as a UI component object that supports
a hover gesture. Components that support hover gestures include Axes,
UIAxes, PolarAxes, Panel, and
Figure objects.
Location to hover at, specified as the coordinates of the hover point:
Axes and UI Axes — A 1-by-2 or 1-by-3 numeric array containing
x-, y-, and optionally
z-coordinates.
Polar Axes — A 1-by-2 numeric array containing θ- and
r-coordinates.
Panel — A 1-by-2 numeric array containing x- and
y-coordinates. Specify the coordinates of the point measured in
pixels from the lower-left corner of the component.
UI Figure — A 1-by-2 numeric array containing x- and
y-coordinates. Specify the coordinates of the point from the
lower-left corner of the component.
You can specify the location of the gesture on a UI figure that uses any unit of measurement.
In previous releases, the method lets you specify coordinates only for figures whose
Units property is set to "pixels".
Specifying the location of the gesture on axes or UI axes with an active right
y-axis is no longer supported. If your chart has two
y-axes, activate the side associated with the left
y-axis before performing the gesture. In previous releases, when you
specify the location on axes or UI axes with an active right side, the app testing framework
interprets that location with respect to the left y-axis, which can cause
the gesture to occur at an unexpected location or fail.
You can perform hover gestures in tests on panels.
You can perform hover gestures in tests on polar axes.
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window.
Web browsers do not support MATLAB commands.
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.