public bool IsElementEnabled(Control control)
 {
     return bool.Parse(client.ElementGetProperty(control.Zone, control.Element, control.Index, "enabled"));
 }
 public bool IsElementFound(Control control)
 {
     return client.IsElementFound(control.Zone, control.Element, control.Index);
 }
 public void VerifyIn(Control control, Control controlToFind, string direction, int width = 0, int height = 0)
 {
     client.VerifyIn(control.Zone, control.Element, control.Index, direction, controlToFind.Zone, controlToFind.Element, width, height);
 }
 public void DragAndDrop(Control dragControl, Control dropControl)
 {
     client.DragDrop(dragControl.Zone, dragControl.Element, dragControl.Index, dropControl.Element, dropControl.Index);
 }
 /// <summary>
 /// Sets the Text to textbox controls
 /// </summary>
 /// <param name="viewName">Provide a valid viewname from controls.xml</param>
 /// <param name="controlName">Provide a valid controlname under the viewname from controls.xml</param>
 /// <param name="textToSet">Text to Set to textbox control</param>
 /// <param name="waitTime">Default wait time is 10 sec. Provide an integer representing milli seconds to wait</param>
 public void SetText(Control control, string textToSet, int waitTime = WaitTime.DefaultWaitTime)
 {
     client.ElementSendText(control.Zone, control.Element, control.Index, textToSet);
 }
 public bool SwipeWhileNotFound(Control control, string direction, int offset = 791, int swipetime = 2000, int delay = 1000, int rounds = 10, bool click = true)
 {
     return client.SwipeWhileNotFound(direction, offset, swipetime, control.Zone, control.Element, 0, delay, rounds, click);
 }
 public int GetElementCount(Control control)
 {
     return client.GetElementCount(control.Zone, control.Element);
 }
 public void RunNativeApICall(Control control, string script)
 {
     client.RunNativeAPICall(control.Zone, control.Element, control.Index, script);
 }
 public bool ElementSwipeWhileNotFound(Control swipeControl, Control controlToFind, string direction, int offset = 100, int swipetime = 2000, int delay = 1000, int rounds = 5, bool click = true)
 {
     return client.ElementSwipeWhileNotFound(swipeControl.Zone, swipeControl.Element, direction, offset, swipetime, controlToFind.Zone, controlToFind.Element, controlToFind.Index, delay, rounds, click);
 }
 public string[] GetAllValues(Control control, string property)
 {
     return client.GetAllValues(control.Zone, control.Element, property);
 }
 public void ElementListVisible(Control control, string dynamicVariable)
 {
     client.ElementListVisible("", control.Element, control.Index);
 }
 public void ElementListSelect(Control control)
 {
     client.ElementListSelect("", control.Element, control.Index, false);
 }
 public void DragElement(Control control, int xOffset, int yOffset)
 {
     client.Drag(control.Zone, control.Element, control.Index, xOffset, yOffset);
 }
 public bool IsFoundIn(Control searchControl, Control controlToFind, string direction, int width = 0, int height = 0)
 {
     return client.IsFoundIn(searchControl.Zone, searchControl.Element, searchControl.Index, direction, controlToFind.Zone, controlToFind.Element, width, height);
 }
 public int GetElementCountIn(Control control, Control controlToFind, string direction, int width = 0, int height = 0)
 {
     return client.GetElementCountIn(control.Zone, control.Element, control.Index, direction, controlToFind.Zone, controlToFind.Element, width, height);
 }
 public void LongClick(Control control, int clickCount = 1, int X = 0, int Y = 0)
 {
     client.LongClick(control.Zone, control.Element, control.Index, clickCount, X, Y);
 }
 /// <summary>
 /// Gets the property of the Element
 /// </summary>
 /// <param name="viewName">Provide a valid viewname from controls.xml</param>
 /// <param name="controlName">Provide a valid controlname under the viewname from controls.xml</param>
 /// <param name="property">Property name to get the value</param>
 /// <param name="waitTime">Default wait time is 10 sec. Provide an integer representing milli seconds to wait</param>
 /// <returns>returns the property string</returns>
 public string GetElementProperty(Control control, string property, int waitTime = WaitTime.DefaultWaitTime)
 {
     return client.ElementGetProperty(control.Zone, control.Element, control.Index, property);
 }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="viewName"></param>
 /// <param name="controlName"></param>
 /// <param name="property"></param>
 /// <param name="value"></param>
 /// <param name="waitTime"></param>
 public void SetElementProperty(Control control, string property, string value)
 {
     client.ElementSetProperty(control.Zone, control.Element, control.Index, property, value);
 }
 public string GetElementText(Control control)
 {
     return client.ElementGetText(control.Zone, control.Element, control.Index);
 }
 public void SwipeElement(Control control, Direction direction, int offSet, int swipeTime)
 {
     client.ElementSwipe(control.Zone, control.Element, control.Index, direction.ToString(), offSet, swipeTime);
 }
 public string GetPosition(Control control)
 {
     return this.client.GetPosition(control.Zone, control.Element);
 }
 /// <summary>
 /// Verifies for the Element not to be found
 /// </summary>
 /// <param name="viewName">Provide a valid viewname from controls.xml</param>
 /// <param name="controlName">Provide a valid controlname under the viewname from controls.xml</param>
 public void VerifyElementNotFound(Control control)
 {
     client.VerifyElementNotFound(control.Zone, control.Element, control.Index);
 }
 public string GetTextIn(Control control, string direction,  string textZone, int Index, int width = 0, int height = 0)
 {
     return client.GetTextIn(control.Zone, control.Element, Index, textZone, direction, width, height);
 }
 /// <summary>
 /// Waits of an Element to vanish from the screen
 /// </summary>
 /// <param name="viewName">Provide a valid viewname from controls.xml</param>
 /// <param name="controlName">Provide a valid controlname under the viewname from controls.xml</param>
 /// <param name="waitTime">Default wait time is 10 sec. Provide an integer representing milli seconds to wait</param>
 public bool WaitForElementToVanish(Control control, int waitTime = WaitTime.DefaultWaitTime)
 {
     return client.WaitForElementToVanish(control.Zone, control.Element, control.Index, waitTime);
 }
 /// <summary>
 /// Performs Click on the control with the given viewname and controlname.
 /// Default clickcount is 1 and waittime is 10 sec
 /// </summary>
 /// <param name="viewName">Provide a valid viewname from controls.xml </param>
 /// <param name="controlName">Provide a valid controlname under the viewname from controls.xml</param>
 /// <param name="clickCount">Default click count is 1. Provide a valid integer value</param>
 /// <param name="waitTime">Default wait time is 10 sec. Provide an integer representing milli seconds to wait</param>
 public void Click(Control control, int clickCount = 1, int waitTime = WaitTime.DefaultWaitTime)
 {
     client.Click(control.Zone, control.Element, control.Index, clickCount);
 }