私はブラウザテスト用にSelenium webdriverを使用するC#テストフレームワークを更新しています。各テストケースを起動すると、私はテストしている開発サイトに乗るために、Windows Secruityポップアップ(IE11:v11.187.14393.0)をバイパスする必要があります。私はこれまでAutoItを次のコードで使用していました。Windows 10 - IE 11 Windows Secruityポップアップ - AutoITは制御情報を返しません。
AutoItX3 autoIt = new AutoItX3();
string windowTitle = "Windows Security";
// Wait 30 seconds max...
autoIt.WinWait(windowTitle, string.Empty, 30);
// Need to wait for input fields to load...
Thread.Sleep(2000);
autoIt.WinActivate(windowTitle);
autoIt.ControlSetText(windowTitle, string.Empty, "[CLASS:Edit; INSTANCE:1]", username);
autoIt.ControlSetText(windowTitle, string.Empty, "[CLASS:Edit; INSTANCE:2]", password);
autoIt.ControlClick(windowTitle, "OK", "[CLASS:Button; INSTANCE:2]");
autoIt.WinWaitClose(windowTitle, string.Empty, 10);
私は以来、10のウィンドウに私のOSを更新したとポップアップボックスが以降に変更された(下記参照)
See new security popup example
See old secruity popup example
のAutoIt検査官は、もはや任意の制御情報を返します。秘密のポップアップウィンドウ内の任意のオブジェクトのため、私はそれらと対話することができません。(彼検査官が、ユーザー名の入力ボックスのために返すものを下記参照)
ウィンドウ< < < < タイトル:Windowsセキュリティ クラス:資格ダイアログXAMLホスト 位置:732、354 サイズ: 456,386 スタイル:0x96C80000 ExStyle:0x00200100 ハンドル:0x00000000015B1204
コントロール< < < < クラス:
インスタンス:
ClassnameNN:
名:
上級(クラス):
ID: テキスト:
ポジション:
サイズ:
ControlClick COORDS:
スタイル:
ExStyle:
ハンドル:マウス< < < < 位置:816、548 カーソルID:0 色:0xF0F0F0
ステータスバー< < < <
ToolsBar < < < <
目に見えるテキスト< < < <
隠し文字< < < <
私は、アクティブなウィンドウでのAutoItを指し、直接キーを送信しようとしたが、これありえないのいずれかの作業。 (下記コード参照)。
string windowTitle = "Windows Security";
// Wait 30 seconds max...
autoIt.WinWait(windowTitle, string.Empty, 30);
// Need to wait for input fields to load...
Thread.Sleep(2000);
autoIt.WinActivate(windowTitle);
autoIt.Send(username);
autoIt.Send(Keys.Tab.ToString());
autoIt.Send(password);
autoIt.Send(Keys.Enter.ToString());
autoIt.WinWaitClose(windowTitle, string.Empty, 10);
どのように私はこれを過去に得ることができるアイデアはありますか?
おかげ