Macro errors out and stops at "click" step

I’m trying to search the following website

with a macro. I edit the typo step to get the word “preços de transferência” in (it doesn’t find anything w/o the non-English letters). However, the macro somehow
Portugal CAAD-f78691b0-d3fb-11ed-b1b1-c7afde4192cd.json (671 Bytes)
freezes (see below). What can we do?

1 Like

Hi Alex, it seems that the issue you encountered is due to the click step not finding the element with the CSS selector .hover. This situation likely occurred because the element’s state temporarily changed when it received focus, and the class hover was added to its attributes. The selector was created using this new class, but when replaying the macro, the class wasn’t present in the element being clicked, causing the selector to not match anything.

To resolve this issue, you can use the element’s id attribute instead of the .hover class for the selector. The id attribute is unique and will remain consistent, ensuring that the selector works as expected when replaying the macro. To update the selector, you can edit the macro step and replace the .hover class with the corresponding id attribute of the element. This should help to avoid the error and ensure the macro works correctly. For example, let’s say the HTML code for the clicked element looks like this:

<button id="example-button" class="hover">Click me</button>

In this case, the id attribute of the element is “example-button”. To create a CSS selector using the id, you would use the hash symbol # followed by the id value:


@snrxtreme Any thoughts on how could this issue be handled? Should we let user re-select elements visually? When in selection mode, the temporary class could be avoided easily and users and edit the selector visually.

I appreciate your response. But to be honest, I didn’t understand a word and I’m as smart as before.

Hi Alex,

[ you can skip reading this paragraph if you don’t want to understand why the error occurs]
The problem is that the selector generated is buggy because of the temporary class “.hover” added to the input element when you hover over it. As soon as you move your cursor away from the input box, the hover class is removed from the input box. so “.hover” as a selector will not match any element.

Can you try the following steps to resolve?

  1. Click on the “three dots” in the “click step” that errored out.

  2. Click on the “Edit Step” option.
    Screenshot 2023-04-08 at 5.37.32 PM

  3. Edit the selector from “.hover” to “#searchs_texto
    Screenshot 2023-04-08 at 5.38.19 PM

  4. Click on the save button.

Now your step should work.

Note: I presume your next step would be a “type” on the same input element. In that case, edit the selector of the type step, the same way.

1 Like

Please see screenshot of how the macro looks like now. However, it appears that the “wait_doc” element does not come to a stop (see the blue bar on top of it).

Thanks so much.

I’m encountering the same issue with this Romanian website

at the drag element.

Is that also supposed to be replaced with “#searchs_texto”?

If “Wait_doc” is added while recording but doesn’t time-out during replay, you can delete “wait_doc” step from there and insert “wait_for_duration” step there, with the duration set to “5” seconds.

I presume you clicked on an element but it recorded drag. Can you mention which element you tried to click on ? So that i can give you a good selector .

Please see the yellow marked field, that would have been the next step to put in a period of time.

Can you please edit the step to change the type from “drag” to “click” by:

  1. Clicking on “Edit-Step”.
  2. Choose the stepType “click” in the drop-down.
  3. Also set the selector value to “[for*=‘tip_data’]~ .input-group .interval”
  4. Save the step.

We have logged these improper selectors being generated, as a bug. we will fix it in the future.

If I go on “edit step” of the drag step, there is no drop down and no “selector value” see attached screenshot.

I’m sorry for the inaccuracy. You cannot switch from one step type to another on edit.

Please follow the below instructions:

  1. Click on the step’s menu (three dots) and click on “Delete”.

  2. Go to it’s previous step, click on the step’s menu and click on “Insert Step After”.

  3. Now, choose the step type “click” from dropdown.

  4. The first input box ( text input) is where you enter the selector’s value: [for*='tip_data']~ .input-group .interval

  5. Click on save.

Now you will have the correct “click” step in place.

I have another Macor error out and stops at “click” step problem with this website:

Please see the error message (Turkey1) and the field (Turkey2).

Can anyone send a reply, this probably fell through the cracks…

Hi Alex, thanks for sharing the case and following up.

It looks like the click step to select an option in the dropdown in not working. The root cause is that the selector for the step to select an option in the dropdown in not able to locate the item.

I needed to manually create a selector for that element. I have exported the macro with updated selector as JSON for reference: - click test-25d34ac4-e0b4-11ed-a258-175f675c5afa.json (841 Bytes)

Following selector was used to select the second item: .select2-results__options > li:nth-child(2)
Similarly, .select2-results__options > li:nth-child(3) can be used to select the third item in the list.

Hope this helps!

This macro times out. Any help? Thanks
Singapore Supreme Court-30239cde-30a1-11ee-9408-fb8a2d987e9f.json (667 Bytes)