cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jibbs
Regular Visitor

Web button recognized but does not perform its function

Hello PAD Team,

 

I am trying to press a Browse button on a web page, which will open a file select window. However, using either 'Press button on web page' or 'Click link on web page' doesnt open the file select window. 

 

Additional details:

This issue does NOT trigger an error message - I assume this means that PAD thinks it actually performed the task, when it clearly didnt.

I know the button works when I manually click.

I cannot use mouse clicks as a solution because the windows size changes.

 

What are my options here?

 

Thank you so much!

18 REPLIES 18
UK_Mike
Post Prodigy
Post Prodigy

Try "Press Button in Window" from the Actions Pane.

jibbs
Regular Visitor

I forgot to mention I already tried that but no dice.

Henrik_M
Dual Super User
Dual Super User


@jibbs wrote:

I cannot use mouse clicks as a solution because the windows size changes.

 


You can with this technique: How to send physical right/left click on web element | Microsoft Docs

Guriga
Advocate II
Advocate II

Hi,

Edit the UI element, choose Custom, delete everything there and paste this.

div:contains('Browse') > button.

Imrans23
Frequent Visitor

Hey, 

 

I would suggest using Guriga's idea because it will always look for the specific div rather than move mouse and click.

 

But the combination of actions, "move mouse" and "send left click" can be another alternative. Move mouse also accounts for if your window size is different. Just throw in a move mouse command, in the settings window, make sure "Active Window" is selected and make sure you keep the window with the button selected, then take your cursor to the button and hit ctrl+shift to record the x and y coordinate as to where the button is located. Once you have the move mouse done, then send the "send left click" command. 

 

This is optional, but for added measure, in your flow, before move mouse, you can add another command i.e. "Focus Window" and select the window where the button is located. That way, RPA will select the window as active window and thereby move the cursor to the correct position before sending left click. 

jibbs
Regular Visitor

Hi @Guriga , I went to edit the UI element, chose Custom, and removed everything there, but I cannot paste in anything. Here is what I see: 

jibbs_0-1643303895221.png

Any suggestions?

Henrik_M
Dual Super User
Dual Super User

It's NOT custom right now. Toggle has to be TO THE LEFT.....

jibbs
Regular Visitor

Thank you. I appreciate all the replies so far.

I pasted "div:contains('Browse') > button." but still it's saying not found:

jibbs_0-1643316394772.png

 

Henrik_M
Dual Super User
Dual Super User

"DOUBLE QUOTES" not 'single quotes'

button:contains("Browse")

Hi,

 

Mine working with single quotes. 

Hi,

 

What is the text on your button?

jibbs
Regular Visitor

Hi, button looks like this:

jibbs_0-1643382856343.png

 

Henrik_M
Dual Super User
Dual Super User

try with capital BROWSE letters.

jibbs
Regular Visitor

Hi,
Here are the combinations I have attempted so far, no success:

div:contains('Browse') > button.

div:contains("Browse") > button.

div:contains("BROWSE") > button.

div:contains("BROWSE...") > button.

button:contains("Browse")

button:contains("BROWSE")

button:contains("BROWSE...")

 

All kick back the same button with selector XX not found message.

Henrik_M
Dual Super User
Dual Super User

Can you attach the html source code of the page?

jibbs
Regular Visitor

jibbs_0-1643663558088.png

I'm new to Power Automate so I am very grateful for your help! Let me know if you need different screenshot or if there is a better way I can share this info.

Henrik_M
Dual Super User
Dual Super User

OK, so it's not actually a button element.

a[title="Browse..."] should work with both Click link on web page and Press button on web page.

Alternatively, you can try using a Populate text field on web page on the element with selector input[name="importfile"] since that sometimes opens the file dialog, fills it automatically, and submits it.

jibbs
Regular Visitor

Thank you @Henrik_M 

I tried a[title="Browse..."] with both Click link on web page and Press button on web page, but neither worked. I want to try your second suggestion, but what do I enter in the text box? It wont let me run without something in that field.

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

New Process Advisor Capabilities carousel.png

Read the blog for the latest news

Read the latest about new experiences and capabilities in the Power Automate product blog.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (3,660)