[英]Coded UI BrowserWindow casting to Selenium InternetExplorerDriver
I am creating a CodedUI project in Visual studio along with Selenium web driver. 我正在Selenium Web驱动程序和Visual Studio中创建一个CodedUI项目。
I have CodedUI's BrowserWindow and a Selenium's InternetExplorerDriver . 我有CodedUI的BrowserWindow和Selenium的InternetExplorerDriver 。 Is there any way to cast CodedUI's BrowserWindow to Selenium's InternetExplorerDriver ?
有什么方法可以将CodedUI的BrowserWindow强制转换为Selenium的InternetExplorerDriver吗?
Example like: 像这样的例子:
BrowserWindow browser = new BrowserWindow.Launch("http://abc.xyz");
IWebDriver driver = browser;
Thanks in Advance 提前致谢
您不能,它们是完全不同的两件事。
I assume you want to do some activities using selenium browser and some with Codedui browser. 我假设您想使用Selenium浏览器进行某些活动,而使用Codedui浏览器进行一些活动。 Then Launch browser using selenium and use codedui browser to attach it.
然后使用硒启动浏览器,并使用codedui浏览器将其附加。
example 例
Selenium Browser 硒浏览器
IWebDriver driver = new InternetExplorerDriver(ConfigurationManager.AppSettings["iedriver_exe"]); IWebDriver驱动程序=新的InternetExplorerDriver(ConfigurationManager.AppSettings [“ iedriver_exe”]); driver.Navigate().GoToUrl(urlLink);
driver.Navigate()。GoToUrl(urlLink);
CodedUi Browser var browser = BrowserWindow.Locate("browsertitle"); CodedUi浏览器 var browser = BrowserWindow.Locate(“ browsertitle”);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.