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.
-
Right-click on the <I class… line and get the xPath.
-
Adjust the xPath to replace the ID with contain pattern.
For example: //*[@id="utb-centerDiv-16748"]/div[12]/a/i
Function Button
-
To find the xPath for the menu, click on the Function button and then highlight the entire drop down menu.
This will highlight a piece of XML as shown below in Dev tools.
-
Get the xpath and adjust the xPath to replace the ID with contain pattern. Add /div[2]/table/tbody to the end.
For example, //*[@id=contains(‘_functionsDropdown-28462’)]/div[2]/table/tbody