编码 UI BrowserWindow 投射到 Selenium InternetExplorerDriver
Coded UI BrowserWindow casting to Selenium InternetExplorerDriver
我正在 Visual studio 中创建一个 CodedUI 项目以及 Selenium 网络驱动程序。
我有 CodedUI 的 BrowserWindow 和 Selenium 的 InternetExplorerDriver。
有什么方法可以将 CodedUI 的 BrowserWindow 转换为 Selenium 的 InternetExplorerDriver?
例如:
BrowserWindow browser = new BrowserWindow.Launch("http://abc.xyz");
IWebDriver driver = browser;
提前致谢
你不能,它们是两个完全不同的东西。
我假设您想使用 selenium 浏览器进行一些活动,而使用 Codedui 浏览器进行一些活动。然后使用 selenium 启动浏览器并使用 codedui 浏览器附加它。
例子
Selenium 浏览器
IWebDriver 驱动程序 = new InternetExplorerDriver(ConfigurationManager.AppSettings["iedriver_exe"]);
driver.Navigate().GoToUrl(urlLink);
CodedUi 浏览器
var 浏览器 = BrowserWindow.Locate("browsertitle");
我正在 Visual studio 中创建一个 CodedUI 项目以及 Selenium 网络驱动程序。
我有 CodedUI 的 BrowserWindow 和 Selenium 的 InternetExplorerDriver。 有什么方法可以将 CodedUI 的 BrowserWindow 转换为 Selenium 的 InternetExplorerDriver?
例如:
BrowserWindow browser = new BrowserWindow.Launch("http://abc.xyz");
IWebDriver driver = browser;
提前致谢
你不能,它们是两个完全不同的东西。
我假设您想使用 selenium 浏览器进行一些活动,而使用 Codedui 浏览器进行一些活动。然后使用 selenium 启动浏览器并使用 codedui 浏览器附加它。
例子
Selenium 浏览器
IWebDriver 驱动程序 = new InternetExplorerDriver(ConfigurationManager.AppSettings["iedriver_exe"]); driver.Navigate().GoToUrl(urlLink);
CodedUi 浏览器 var 浏览器 = BrowserWindow.Locate("browsertitle");