using System; using System.Drawing; using Arp.Prova.ImageLibrary; using Arp.Prova.CsvLib; using Arp.Prova.PlayLib; // CodeClass public class CodeClass { public static int CodeStart() { //選択するフォルダ名(選択するフォルダ名を変更する場合は、「Program Files」を変更してください) string folderName = "Program Files"; /************************ここから設定の変更を行います************************/ //Explorerを実行し、Cドライブ直下のエクスプローラを開く PlayLib.ProcessStart("explorer", @"C:\"); //Cドライブ画面が開くまで待つ(待ち時間60秒) if(PlayLib.WaitWindow("*(C:)*", true, 60) == true) { //「Program Files」フォルダが存在するかチェック if(PlayLib.Window("*(C:)*").UIListBox("UIListBox&1").CheckItemProperty("Exists",folderName, true, 0) == true) { //Cドライブの中の「Program Files」フォルダを選択する PlayLib.Window("*(C:)*").UIListBox("UIListBox&1").Click(folderName); } else { //「Program Files」フォルダが存在しなかった場合 PlayLib.TestLogError("「" + folderName + "」フォルダが存在しません。"); return -1; } } else { //Cドライブ画面が開かなかった場合、ログを出力し処理を終了する PlayLib.TestLogError("「Windows (C:)」画面が開きませんでした"); return -1; } return 0; } }