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 get total and c...
Power Automate
Answered

How to get total and current time from web videos correctly

(0) ShareShare
ReportReport
Posted on by 41

Hi, I approached this with Extract text with OCR, then dividing that text by the slash, and because I needed it to be in seconds, I did the same but with ":", multiplying the minutes by 60, and then adding that to the seconds after the sign. However, there is an error telling me the total seconds aren't in a numeric value. Is the problem related to conversion, or to the actions already mentioned?
What should be corrected specifically?

Captura de pantalla 2024-02-04 164931.pngCaptura de pantalla 2024-02-04 164954.png

I have the same question (0)
  • UshaJyothiKasibhotla Profile Picture
    225 Moderator on at

    HI @Gonza1 

    Please convert the variable which has the time into numeric value.

    since the number is taken as text in default the bot is unable to do mathematical operations with it.

     

    I could not find the variable since the flow is in other language which I am unaware.

     

    Hope this may be the variable  %TiempoTotalEnsegundos%   

    Use convert text to number activity and give this variable as input then use that output for further operations.

    UshaJyothi20_0-1707369290966.png

     

    Hope this helps,

    Usha.

     

     

  • Gonza1 Profile Picture
    41 on at

    Thanks for the answer @UshaJyothi20!

     

    It's in spanish and I tried to change language, the option unfortunately isn't there.

     

    I changed all the variables that should be number to it, even those who come from a mathematical operation to be sure, and one of the errors has been solved. However, 2 of them are still there. I think the second can be solved relatively easily. The first one is the one that appears in the loop in the image.

    I'm wondering if using OCR to recognize the value is correct, or if it's better to extract it as an UI element, could it be related to that?

    By the way, what I'm trying to do is capturing video from links like these (https://dev.epicgames.com/community/learning/courses/pxm/unreal-engine-creating-pbr-materials/5rM/unreal-engine-tinted-glass-part-2-vertex-painting) for better playback (video stops as if internet speed wasn't enough even if it is). Maybe there is an easier way.

  • UshaJyothiKasibhotla Profile Picture
    225 Moderator on at

    Could you please try with Extract data from web page?

     

    Hope this helps

    Usha.

  • Gonza1 Profile Picture
    41 on at

    Usha, I now tried to simplify by making a new flow for testing purposes, using "Extract data from web page", and the time text doesn't appear as a variable. Apparently the mouse click to start the video (required step before seeing the time) isn't generating the playback, but I don't know why.Captura de pantalla 2024-02-08 135108.png

    In english, this would be: "Initiate Chrome", "Move mouse to 'Span'(UI Element)", "Send click", "Wait 3 seconds", and "Extract data from web page".

  • UshaJyothiKasibhotla Profile Picture
    225 Moderator on at

    Please see the result without using send mouse click..... Once again please let me know what you need and where you are getting the problem.

  • Gonza1 Profile Picture
    41 on at

    Without the mouse click, the variable is still white.

     

    So, what I'm doing with this is going step by step to see why it doesn't get the number variable, and this shows that with these steps, the variable isn't captured, so this could be the problem.

     

    The thing is, how do we get it? If you could try directly from the link (https://dev.epicgames.com/community/learning/courses/pxm/unreal-engine-creating-pbr-materials/5rM/unreal-engine-tinted-glass-part-2-vertex-painting) only to know how to extract the time values, it would be extremely helpful.

  • WillSG Profile Picture
    352 Moderator on at

    Hi @Gonza1  I hope you are doing well.

     

    Sometimes there are blank spaces at the beginning or end of a value, so instead of OR in addition to the Text to Number action, use the Trim action, this action will help you “Clean” the value, especially if it has blank spaces.

     

    Also, I tested the link you shared, and I was able to extract the time with the “Get Details of Element on Web” action.

     

    Then, I use the split and trim actions to get the values and finally I used the set variable to perform the calculation.

     

    Here is the snipped below and check the attached image.

     

    Text.SplitText.SplitWithDelimiter Text: AttributeValue2 CustomDelimiter: $'''/''' IsRegEx: False Result=> TextList

    Text.Trim Text: TextList[1] TrimOption: Text.TrimOption.Both TrimmedText=> TrimmedText

    Text.SplitText.SplitWithDelimiter Text: TrimmedText CustomDelimiter: $''':''' IsRegEx: False Result=> TextList2

    SET MinutesToSeconds TO TextList2[0] * 60

    SET TotalSeconds TO TextList2[1] + MinutesToSeconds

    Display.ShowMessageDialog.ShowMessage Title: $'''Hola!''' Message: $'''Total de Segundos: %TotalSeconds%''' Icon: Display.Icon.None Buttons: Display.Buttons.OK DefaultButton: Display.DefaultButton.Button1 IsTopMost: True ButtonPressed=> ButtonPressed

     

     

    Please let me know if it works, happy automation!,


    If I have addressed your inquiry successfully, kindly consider marking my response as the preferred solution. If you found my assistance helpful, a 'Thumbs Up' would be greatly appreciated.

     

    Additionally, I offer specialized consultancy and development services leveraging PAD. If you're interested in exploring these services further, feel free to DM me, and we can initiate a discussion.

     

    Kind regards,

     

    Will SG

    Managing Director & Automation Lead

    RAMS CR (Recruitment & Automation)

    LinkedIn Profile

     

    WillSG_Screenshot 2024-02-08 193426.pngWillSG_Screenshot 2024-02-08 194540_2.png

  • Gonza1 Profile Picture
    41 on at

    Well, this proved to be really useful, thank you very much!

    Incredibly, some actions were really similar but weren't working well, like "moving mouse to", and "clicking", gave a different result than "click link on a web page", as "extract data from webpage" wasn't the same as "get details of element on web page".

     

    I will continue with the rest of the flow later to see if it solves the errors, but thanks again!

  • WillSG Profile Picture
    352 Moderator on at

    Hey @Gonza1  I’m super happy that you like it and learn something new.

    If I have addressed your inquiry successfully, kindly consider marking my response as the preferred solution. If you found my assistance helpful, a 'Thumbs Up' would be great appreciate it.

     

    Kind regards,

    Will SG

    Managing Director & Automation Lead

    RAMS CR (Recruitment & Automation)

    LinkedIn Profile

  • Gonza1 Profile Picture
    41 on at

    For now, it works, I only need to test in the entire flow, which I'm going to, later. If I need more help I continue the thread, and if not, I mark it as the solution! Thanks again!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 607

#2
Valantis Profile Picture

Valantis 456

#3
11manish Profile Picture

11manish 352

Last 30 days Overall leaderboard