C# Syntax
public class VisualRelation
// Locate button number 1 in the calculator based on the location of buttons number 2 and 4. var button1 = calculator.Describe<IButton>( new ButtonDescription { NativeClass = "Button", Vri = { new VisualRelation { // Button number 2 is to the right of button number 1. TestObject = button2, HorizontalRelation = HorizontalVisualRelation.Right, }, new VisualRelation { // Button number 4 is above the button number 1. TestObject = button4, VerticalRelation = VerticalVisualRelation.Above, } } });
var usernameLabel = browser.Describe<IWebElement>(new WebElementDescription { TagName = @"TD", InnerText = @"User Name:" }); browser.Describe<IEditField>(new EditFieldDescription { Vri = { new VisualRelation{ TestObject = usernameLabel, HorizontalRelation = HorizontalVisualRelation.LeftAndInline } } }).SetValue("mercury");
System.Object
HP.LFT.SDK.VisualRelation
Name | Description | |
---|---|---|
![]() | VisualRelation Constructor | Initializes a new instance of the VisualRelation class with null values for all 3 relation elements. |
Name | Description | |
---|---|---|
![]() | HorizontalRelation | The horizontal relation definition. |
![]() | ProximityRelation | The proximity relation definition. |
![]() | TestObject | The related test object. |
![]() | VerticalRelation | The vertical relation definition. |