51Testing软件测试论坛
标题:
[求大神]怎样使用selenium impersonate another user
[打印本页]
作者:
selenium7
时间:
2014-1-21 10:06
标题:
[求大神]怎样使用selenium impersonate another user
现在启动的浏览器默认的都是本机的用户,我希望用另外一个用户启动浏览器, 有谁知道怎么操作吗? 用.NET API是这样实现的:
SecureString ss = new SecureString();
char[] pass = new char[] { '1', '2', '3', '4', '5', '6', '7', '0', '1' };
foreach (char item in pass)
{
ss.AppendChar(item);
}
ProcessStartInfo psi = new ProcessStartInfo("C:\\Program Files (x86)\\Internet Explorer\\iexplore.exe");
psi.UserName = "";
psi.Domain = "";
psi.Password = ss;
psi.UseShellExecute = false;
psi.WorkingDirectory = "C:\\Program Files (x86)\\Internet Explorer";
try
{
Process.Start(psi);
}
catch (Exception e)
{
Console.WriteLine("Exception: " + e.Message);
}
Console.WriteLine("done");
webdriver有这样的方法吗?
作者:
lsekfe
时间:
2014-4-16 14:36
不多说了,直接给你一个帖子参考吧!
http://bbs.51testing.com/viewthr ... highlight=webdriver
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2