Table of contents

Contents



Official Content

This command is useful to check if a control is enabled on the page, without checking if it is visible or not.

This command returns true if the element is enabled and false if not, and can be executed using different locators (control name, id, name, CSS, XPath, or LinkText) as follows:

IsControlEnabled

image_2020102162321_1_png

Checks whether a control is present and enabled or not.

Parameters

  • ControlName: name of the control

Example

&driver.IsControlEnabled("LoginButton")

IsControlEnabled

IsControlEnabledGrid_png

Checks whether a control is present and enabled or not.

Parameters

  • ControlName: name of the control
  • Row: the row number where the control is located inside the grid

Example

&driver.IsControlEnabled("Delete", 2)
&driver.IsControlEnabled("Component2.Add", 1)

 

IsElementEnabledByID

image_202010216185_1_png

Checks if an element is enabled using its ID.

Parameters:

  • ID: the HTML element ID .

Example of use: 

&driver.IsElementEnabledByID("InvoiceTotal")
 

IsElementEnabledByName

image_2020102161859_1_png

Checks if an element is enabled using its 'name' attribute.

Parameters:

  • Name: the value of the NAME attribute of the element. 

Example of use: 

&driver.IsElementEnabledByName("total")

IsElementEnabledByCSS

image_2020102161739_1_png

Checks if an element is enabled using its CSS selector.

Parameters:

  • CSS: the CSS selector to the element. 

Example of use: 

&driver.IsElementEnabledByCSS("#vVAR1")

IsElementEnabledByXPath

image_2020102161921_1_png

Checks if an element is enabled using an XPath selector.

Parameters:

  • XPath: the XPath selector to the element. 

Example of use: 

&driver.IsElementEnabledByXPath("//textarea[@id='vVAR1']")

IsElementEnabledByLinkText

image_2020102161831_1_png

Checks if an element is enabled using a LinkText selector.

Parameters:

  • LinkText: the link’s text of the element. 

Example of use: 

&driver.IsElementEnabledByLinkText("Edit")


Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant