cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to click Login button in Web Application

Dirk-Jan
Level 2

Hi,

I'm trying to make one of our robot login in a web application. It has to be done via the form as shown below:

DirkJan_0-1716367000466.png

I can fill username and password just fine. The only way I can make the robot click on the Login button is via the region mode. The goal is to make this robot run on a locked desktop so I have to find another way.

I've tried it via Browser mode and when I identify the Login button it works (it gives the outline on the button). But when I run the robot it does not click/does not login.

So I've looked at the DOM/xpath and I see slot tags:

DirkJan_1-1716367697486.png

 

Not sure if these tags cause the problem but they only surround this button and I haven't seen them any where else. 

I've tried this via Javascript insert/invoke but I run into CSP. For now I am not sure how to work around this. UIA mode doesn't work either.

Does anyone have an idea how to solve this?

Your help is be highly appreciated.

 

6 REPLIES 6

faheemsd
MVP

Dear @Dirk-Jan 

I would like to suggest checking how your able to login manually by clicking on the login button. I mean please observe the application carefully on which portion of the login Button your exactly clicking Manually.

Please spy the element with all available setions in Login button for example inner side , outer side and middle portion of the login button with Browse mode.

Try to click on the login button and see the results.

I would suggest going with Browse or UI Mode for this login activity.

Please try the results and let me know if you face any errors.

 

MichealCharron
Level 8

@Dirk-Jan 

Depending on the listener events used, it can sometimes get tricky to get the right combination. One method I am going to suggest is the Focus/Global Send Keys combination but it needs to tested out manually first.

  1. Bring up the form.
  2. Click into the password field (you might have to fill in the Username and Password fields first to activate the login button).
  3. Press the TAB key until you see a bounding box around the "Login at Inhuur" button.
  4. Press the ENTER key.

If the ENTER key activates the login button you can try the Focus/Global Send Keys combination. In a navigate stage, add a "Focus" action and a "Global Send Keys" action (sending the ENTER key) using your login button element. Make sure there is a small wait in the "Pause After Each Step" field of the navigate stage.

MichealCharron_0-1716387654253.png

Debugging this gets tricky because most people don't realize that the Global Send Keys action uses the .NET Framework's SendKeys.SendWait method which works on the active application and not on the application the element is in. You can't step over this navigate stage because Blue Prism Studio is the active application so you need to set the next stage to a few stages before the navigate stage, run to a stage just after it and quickly click somewhere on the browser window, to make it the active application, just before it hits the stage in studio.

Also, may I suggest the following XPath expression for the login button element:

//button[@title='Login at Inhuur']

 

Micheal Charron
RBC
Toronto, Ontario
Canada

I think I'm closer to a solution.

After filling username and password I selected the password field and pressed tab. And then enter. That works. 

I also added a sleep stage and did a manual click on the browser. After that is stage with a focus on the button and a global send keys with "{ENTER}". After that it logged in.

Replaced the sleep stage with an activate stage so I now have:

 

DirkJan_1-1716454201754.png

This works but only with an unlocked screen. Do you have any suggestions on how to make this work with a locked screen?

Thank you for your help so far! It helped a lot!

 

 

Hi @Dirk-Jan ,

What do you mean by Locked Screen? Is it a physical machine? or the process runs on a VM? 

Hi @Chakkravarthi_PR,

This process runs on a physical Windows 10 desktop. That desktop is supposed to be locked.

Ahh...now it make sense. 

Similarly we have had a physical machine which runs process on it. 

The approach which we have had there was: 

  1. Start
  2. Unlock Screen (Login Agent Action)
  3. Launch Application (Navigate to URL, Open Application, etc.)
  4. Perform Tasks (Fill Forms, Click Buttons, etc.)
  5. Logout and Lock Screen (Optional)
  6. End

Have you tried the Login Agent Unlock Screen Action:

Chakkravarthi_PR_0-1716458720702.png

Unlocking the Windows Session:

The Login Agent can unlock a Windows session using predefined credentials. This involves sending the username, password, and domain information to the login screen to authenticate and unlock the session. Once the session is unlocked try to make the process runs as per the steps mentioned by @MichealCharron to interact with the screen.

 

When a machine is locked, most automation actions that require UI interaction will fail because they can't interact with the elements on the screen. By unlocking the screen, the Login Agent ensures that the desktop environment is accessible, allowing the automation process to proceed as if a user is actively using the machine.