web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to configure slide...
Power Automate
Answered

How to configure slider in web page

(0) ShareShare
ReportReport
Posted on by 4

For example, I would like to config the slider in the below web page, which involed 1. clicking on the correct tick box and 2. drag the slide to a specific value (there is no text box to enter the value, so I have to drag until the correct minimum and maximum).

 

Thank you in advance. 

 

URL: https://www.sgx.com/securities/stock-screener

Fam_0-1633756038412.png

 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello @Fam 

     

    It was more difficult than I think...

    At first, I found that the <div> tag of slider circle handle has attribute "aria-valuenow", so I tried to change its value using action "Run JavaScript function on web page", but I had not succeeded.

     

    So I decided to change the approach, and try to drag the slider handle with the mouse.

    For now, I need to know the coordinates (X, Y) of the UI element.

    Referring to the documentation below, I was able to get them:

    Get the coordinates and size of a web element - Power Automate | Microsoft Docs

     

    To emulate the drag operation of mouse, I used actions below:

    "Move mouse (to the X, Y coordinates of UI element)"

    "Send mouse click (Left button down)"

    "Move mouse (increase X value to move it to right direction)

    "Send mouse click (Left button up)"

     

    It's not beautiful, but it worked anyway...

     

    Screenshots of my example flow:

     

    shindomo_0-1633810984936.png

    shindomo_1-1633811035053.png

     

    As a result, I could change the min value of "Tot. Rev ($M)" by moving the slider handle 200 pixels to the right from its initial position:

     

    shindomo_5-1633811815964.png

     

    However, as you may have already noticed, the minimum / maximum value of the slider varies depending on each item, so you have to calculate how much you need to move the mouse left and right in order to set it to the target value. Also depending on the environment of the machine that is running this flow, the position and scale of X and Y may change.

     

    In my personal opinion, it can be difficult to develop a flow having production quality with above approach...

     

    Thank you.

  • Verified answer
    PAG Profile Picture
    154 on at

    There have been discussions regarding when to use Web Automation vs. JavaScript function.

     

    I think this is a case where JavaScript wins. It's really easy to implement and update values once you know the method. Done with just two flow actions:

     

    How to configure slider in web page.PNG

     

    See actions, JavaScript and notes:

    https://power.automate.gallery/qMl8GuIC0cD3 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello @PAG 

     

    You are awesome! The code you shared with us works just fine.

     

    I have to learn more about how to write JavaScript code and how to inspect what method is used in the web page...

     

    Thank you.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 414

#2
11manish Profile Picture

11manish 335 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard