Hi, I have a snippet that inserts texts in fields in a form of a web application. After this, I need to perform some clicks that are exactly the same every time. These elements however are not selected when tabbing through all elements. How can I still do this?
Hi,
You can use the selector setting with the click command to click on a specific item:
Let us know if that works for you.
Unfortunatelly I can't select the element. This is the html of the first button I need to click: **<div _ngcontent-ng-c2962106406="" class="content-wrapper"> Verzend een e-mail </div>**
both the "_ngcontent" part and class are not unique. Any way I can select based on content (such as "verzend een e-mail"?
You can do that using another selector method called XPath. We don't have a UI for it in the sidebar, but you can enable it by editing the {click} command directly.
To do so, double click on the "click" command in the editor so it converts to text/code.
Then, replace the "selector=..." part, with "xpath=...".
The xpath you want is probably something like: //div[contains(text(), 'Verzend een e-mail')]
Hey! Does the click function work with other selector methods?
No I didn't get it to work unfortunatelly. If I were able to manage this, that would surely save me and my colleagues again minutes per week. I guess the developers of the app did a great work trying to prevent automations other than their own.
Hi @boudewijn are you available to have a Google Meet call with me to check this once? Please feel free to email me at gaurang@blaze.today
Hey @Alan_Islas {click} command supports CSS selectors and XPath. Are there any other selector methods you're interested in?
thats what im also trying to figure out, i have this button on a website that i want to click but it seems like the css selectors and the xpath are different for every webpage that its on, even though its the same button that has the same functionality on literally every other webpage
I see. Feel free to email me on gaurang@blaze.today and we can look into this on call together.
Hi all, this is fixed with the August update:
- {click} will now click on whatever selector you provide, irrespective of whether it's interactive or not.
- While generating the selector, you can now toggle an option to select all targets, instead of just the interactive ones.
I tried to make the click action work on a noninteractive element, but it keeps giving the error that it is not an interactive element.
Can you tell me what I did wrong in makeing the sellector?
{click: xpath=#cZH_G2}
Edit: I found what is blocking the element to be selected. TOPdesk works with a lot of iFrames. Each ticket is opened in a new iFrame with new a new ID. The place where I put the shortcode is also in an iFrame. So I need to find a way to select the parent iFrame.
This seems another issue, so this item can be closed.
Hi @Bart_v.d_Voorn Welcome to the forum!
Glad you figured it out.
Note that you can penetrate iframes using the |> syntax: {click: selector=iframe1 |> iframe2 |> #cZH_G2; frame=top} (here iframe1 and iframe2 would be the selectors for the iframe)
Unfortunately the iframes have different Id's every time. I can't find a way to go from the current iframe to the parent, because the selectors only work from parent > child. So I am looking for another way to solve this.
Eventualy I found a way to solve this. The snippet shortcut should not be used in the child iframe, but in an input of the parent iframe. That way you can select all the items from the parent iframe as desired and than click on the child iframe to create the text.
Thank you for your time!

