RBM - What should I do if I get the error "Unable to locate an element on a page"?

RBM - What should I do if I get the error "Unable to locate an element on a page"?


If there is a network or a loading issue, page elements cannot be located. In such cases, you can refer to the screenshot for page load status. If the page is loaded, you can edit the web script.

Unnecessary space or characters in the playback script will lead to script syntax errors. Please edit with caution.

To fix the error by editing the script:

1. Go to RBM Monitor details page -> Edit playback script
2. In the script, add the lines in the following format with appropriate values, above the page elements that cannot be located.
wait(<time in milliseconds>)
wait_for_element_presence(<element type>,<element name>,<maximum wait time in seconds>)
wait_for_element_visibility(<element type>,<element name>,<maximum wait time in seconds>)

For example, in the case of an Xpath element, the format is given below:

wait("1000")
wait_for_element_presence("xpath","element_xpath","40")
wait_for_element_visibility("xpath","element_xpath","40")

Similarly, you can add the other element types like id, name, and css as well.
Maximum of 40s can be given for wait time

These methods are only supported in EUM Agent versions 21.3 and above. 
Sample Script:



By default, Applications Manager will check for the element presence with 10s as the timeout. Adding these dynamic waits will add an additional timeout to the default timeout.

Option to increase element timeout for the entire script: 

To increase the element timeout globally for all the elements, you can use the line given below at the top of the playback script.
set_element_timeout("<maximum wait time in seconds>")
Example:
set_element_timeout("40")
Sample Script:



The default element timeout is 10s. Maximum timeout of 40s can be given using this method.

                  New to ADManager Plus?

                    New to ADSelfService Plus?

                      • Related Articles

                      • RBM - Steps to perform Test Playback

                        What is Test Playback? Applications Manager's Real Browser Monitor works based on a playback script that is created during the monitor creation or recording of the transactions. This playback script will contain Locators to locate the HTML elements ...
                      • RBM - FAQs

                        1. I am unable to create a new RBM monitor. Go to  the Support tab and check the license Information. Verify if "EUM Add-on" option is enabled. If it is not enabled, contact sales@manageengine.com to purchase/trial the Add-on since RBM requires the ...
                      • RBM - Enabling the Playback using Microsoft Edge browser

                        Note: Please note that playback using the Microsoft Edge browser is possible only in a Windows server with Microsoft Edge installed on it Please find the below steps to enable the Playback using Microsoft Edge in an EUM Agent: Download the EUM Agent ...
                      • RBM - Configure Content Check using Playback Script

                        Related topic: Check out this link if you want to configure content check through the Chrome Extension (Web Transaction Recorder). Content Check option Applications Manager's Real Browser Monitoring allows to configure content check to be done on the ...
                      • RBM - Chrome playback Troubleshooting

                        Chrome playback option not enabled Verify End User Monitoring Agent version. End User Monitoring Agent (version 17 and above) & Applications Manager (Build no: 15000 and above) is required Check error message in End User Monitoring Agent settings ...