How to click on the above Menu Layout Button? using the Appian Selenium
Discussion posts and replies are publicly visible
Identifying a button in Appian using Selenium can be more challenging than in traditional applications because Appian generates its UI dynamically and many CSS classes can change frequently. Here are some effective and stable ways to locate buttons:
1. Locate by visible textIf the button has visible text, you can use XPath:
driver.find_element(By.XPATH, "//button[normalize-space()='ButtonName']")
If it’s not a <button> element but a <div>, <a>, or similar:
driver.find_element(By.XPATH, "//*[text()='ButtonName']")
2. Use stable attributesLook for attributes like:
aria-label
title
id (if not dynamic)
data-*
Example:
driver.find_element(By.CSS_SELECTOR, "[aria-label='Save']")