How to handle button on the dynamic body?

I’m new at this and confused when I tried to click some button, selector did not recognized. Because the body is dynamic and always changing the name. Like the picture that I sent. On the red mark, is always changing. I want to click the element Marked with blue. Please help me guys, I’m still learning about robot framework.

This is more related to HTML automation, than Robot Framework. What you are needing is to understand the Document Object Model (DOM) and its “navigation language” XPATH.

In your case, you can access the element with an absolute or relative XPATH, path. For example:

//div/div/div[2]/div  (and so on...)

You can also use CSS locators, and some functions, like this one for you case:

//div[contains(@id, 'am-modal-container')]

(note: I did not test nor confirmed the syntax of my examples)

Good luck on you research!

1 Like

Thanks, I will learning the basic again.