This applies for the icons on the spreadsheet menu bar only. All other buttons menus must use other keywords/xPath methods.
For All icons, follow the steps below.
-
Using Developer tools, highlight the icon.
-
A section of the DOM will be highlighted as follows.
-
Locate the data-qa-locator in the parent div (red arrow) and locate the button title in the a tag (black arrow). Use those values in the following xpath template:
//*[@data-qa-locator='<data-qa-locator value>’]/div/div/a[@title='<title-value>']/
Function Button
-
To find the xPath for the menu, click on the Function button and then highlight the function button.
This will highlight a piece of XML as shown below in Dev tools.
-
From the highlighted line (black arrow) look up 2 lines to the div containing the data-qa-locator (red arrow). Use the value in the following xpath template.
//*[@data-qa-locator='<data-qa-locator value>']/div/div/i