0

WatiN を使用した Win7 での Windows セキュリティ ポップアップの処理に問題があります。ここから解決策を試しています: [1]: WatiN LogonDialogHandlers が Windows 7 で正しく動作していません(最後の回答)。コードを変更せずにそのまま使用してください、私の呼び出し:

Ie.DialogWatcher.Add(new Windows7LogonDialogHandler(user, passw));
Ie.GoTo(url);

しかし、エラーが発生します:

Exception was thrown while DialogWatcher called HandleDialog: System.InvalidOperationException: Sequence contains no elements
   at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)

この時点で:

var another = (from AutomationElement list in lists
                               where list.Current.ClassName == "UserTile"
                               where list.Current.Name == "Use another account"
                               select list).First();

私が逃したものは何ですか?

4

0 に答える 0