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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Power Autmateを使ってPADの処...
Power Automate
Suggested Answer

Power Autmateを使ってPADの処理を完全自動化したいのですが...

(0) ShareShare
ReportReport
Posted on by
はじめまして、会社でPADを用いた業務自動化を担当しています。
現在、あるサイトに写真をアップロードして保存する作業をPADで自動化しています。
訳あって、ブラウザー自動化で組んでいる一連のフローをJavaScriptに書き換えたいと考えています。
処理としては単純なもので、ポップアップ画面に表示された「保存ボタン」を押すなどブラウザ上の処理がほとんどなのですが、
JavaScriptに書き換えても上手く動いてくれません。

var buttons = document.querySelectorAll('button');

for (var button of buttons) {

    if (button.textContent.includes('保存')) {

        button.click();

        break;

    }

}
 
上記は保存ボタンをクリックする処理のJavaScriptですが、何か不足がありましたらご指摘いただけると幸いです。
I have the same question (0)
  • Suggested answer
    eetuRobo Profile Picture
    4,204 Super User 2025 Season 2 on at
    Do you have the script inside a function like this:


    Does the button actually contain that string "保存"? 
    Check with the inspection tool in browser that it has that exact string in it:


    I tested that code (changed the your button text to be "Display Inputs") and worked for me in the practice site.


    For troubleshooting add return("Button found") before the break and see if the %Result% variable has the value "Button found"
    Like so:

    function ExecuteScript() {var buttons = document.querySelectorAll('button');

    for (var button of buttons) {

        if (button.textContent.includes('保存')) {

            button.click();

            return("button found");

            break;

        }

    }

    }
     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard