Appiumで作業の自動化ができないか検討をしているところなのですが知識不足でうまく行っていません。
notepadを開いて文字を打ち、保存する簡単なプログラムを作成しようとしたのですが
FindElementByName("ファイル名:").SendKeys("test.txt")のところでテキストボックスにどうしてもtest.txt"が反映されません。
どのように操作するのが正しいのか、ご教示お願いできますでしょうか。
using OpenQA.Selenium.Remote; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace AppiumTest01 { class Program public static void Main(string[] args) { var drivers = new Dictionary<string, RemoteWebDriver>(); //Windows Application Driver実行 string serverPath = System.IO.Path.Combine( "C:\work", @"Windows Application Driver", "WinAppDriver.exe" ); System.Diagnostics.Process.Start(serverPath); DesiredCapabilities appCapabilities = new DesiredCapabilities(); //メモ帳 appCapabilities.SetCapability("app", @"C:\Windows\System32\notepad.exe"); drivers.Add("notepad", new RemoteWebDriver(new Uri(@"http://127.0.0.1:4723"), appCapabilities)); drivers["notepad"].Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(2)); //drivers["notepad"].FindElementByClassName("Notepad").SendKeys("Hello Windows Application Driver World!"); drivers["notepad"].FindElementByName("テキスト エディター").SendKeys("Hello Windows Application Driver World!"); drivers["notepad"].FindElementByName("ファイル(F)").Click(); drivers["notepad"].FindElementByName("名前を付けて保存(A)...").Click(); //ここまではうまく行きます drivers["notepad"].FindElementByName("ファイル名:").SendKeys("test.txt"); //★ここです drivers["notepad"].Dispose(); drivers["notepad"] = null; }

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。