Question

Drop down click

  • 16 December 2022
  • 6 replies
  • 56 views

Badge +5

Hello,

I have developed a browser based bot in which one of the action is to click a drop down field. Bot worked fine in dev env, then bot was moved to prod env. A strange issue is happening now, when this bot is scheduled in prod then it is unable to click on this drop down. However bot works absolutely fine when triggered using ‘Run Bot Now’ option in prod env. Any suggestion on this possible behaviour??

Thanks in anticipation!


6 replies

Userlevel 3
Badge +6

Dear @gauravr13,

 

There are a few potential reasons why your bot might be experiencing this behavior when it is run as part of a scheduled task in the production environment, but not when it is manually triggered using the "Run Bot Now" option:

  1. Differences in the environment: It's possible that there are differences in the environment (e.g., browser version, operating system, etc.) between the development and production environments that are causing the issue.

  2. Timing issues: If the bot is running too quickly, it might not be giving the page enough time to load and render the dropdown element properly. This could cause the bot to fail when it tries to click the dropdown.

  3. Permissions and access: Depending on the permissions and access that the bot has in the production environment, it might not have the necessary privileges to interact with certain elements on the page.

  4. Incorrect element identification: The bot might be using the wrong element identification or selector to locate the dropdown element, which could cause it to fail when it tries to click the element.

To troubleshoot this issue, I would recommend verifying that the bot has the necessary permissions and access in the production environment, checking for any differences in the environment between the development and production environments, and carefully reviewing the element identification and selectors being used to locate the dropdown element. Additionally, you may want to try adding some delays or waits to the bot's workflow to see if timing issues are causing the issue.

 

Regards,

Userlevel 7
Badge +10

Hi @gauravr13

 

Add Capture → Window action just before and after the error prone area and see whether you are getting a black screen there or not. If yes, it is because that, the last RDP session logout was not proper or someone else might be having an active session while the Bot was executing. Please follow either of the below mentioned step to fix the issue.

  • Logout through the Run prompt (Run→ Log-out)

or

  • Use the enclosed .bat file to properly log-out from the runner machine.

Note: There should not be any other active session on the runner machine during the Unattended Bot execution.

Badge +5

Hi @gauravr13

 

Add Capture → Window action just before and after the error prone area and see whether you are getting a black screen there or not. If yes, it is because that, the last RDP session logout was not proper or someone else might be having an active session while the Bot was executing. Please follow either of the below mentioned step to fix the issue.

  • Logout through the Run prompt (Run→ Log-out)

or

  • Use the enclosed .bat file to properly log-out from the runner machine.

Note: There should not be any other active session on the runner machine during the Unattended Bot execution.

Hi @Padmakumar ,

There is no other session active on the runner machine, I have verified that. Still somehow only issue occurs with this drop down. If I manually handle this drop down during the scheduled run, entire process will run after that. Very strange but this is happening.

Userlevel 7
Badge +10

Hi @gauravr13 ,

I am not sure whether it is some kind of a bug or not. In my case, I was using Azure VMs as runners and somehow it is keeping some application running even after logging out through Windows Start → Power → Sign out option. 

It definitely feels weird. But doing the action as I have mentioned will do the trick for you. I had issue with Object capturing and Keystrokes during unattended execution. This small tweak done the magic for me. 

 

Please do the changes and let me know whether it was beneficial or not.

Badge +5

Dear @gauravr13,

 

There are a few potential reasons why your bot might be experiencing this behavior when it is run as part of a scheduled task in the production environment, but not when it is manually triggered using the "Run Bot Now" option:

  1. Differences in the environment: It's possible that there are differences in the environment (e.g., browser version, operating system, etc.) between the development and production environments that are causing the issue.

  2. Timing issues: If the bot is running too quickly, it might not be giving the page enough time to load and render the dropdown element properly. This could cause the bot to fail when it tries to click the dropdown.

  3. Permissions and access: Depending on the permissions and access that the bot has in the production environment, it might not have the necessary privileges to interact with certain elements on the page.

  4. Incorrect element identification: The bot might be using the wrong element identification or selector to locate the dropdown element, which could cause it to fail when it tries to click the element.

To troubleshoot this issue, I would recommend verifying that the bot has the necessary permissions and access in the production environment, checking for any differences in the environment between the development and production environments, and carefully reviewing the element identification and selectors being used to locate the dropdown element. Additionally, you may want to try adding some delays or waits to the bot's workflow to see if timing issues are causing the issue.

 

Regards,

Hi @Zaibi ,

Thanks for the detailed explanation! 

Environment difference, Timing Issue and Permissions/access - I do not think that these are reason behind this issue. I will check on Incorrect element identification again if that is the reason (although I doubt that as well beause in ‘Run bot now’ option it is working fine).

Userlevel 3
Badge +7

Hi @gauravr13 ,

It’s depending on application response time. (system to system vary some time) that caused the issue. Could you please add few milliseconds on before the clicking drop down and selecting the menu between as well. 

 

Reply