简体   繁体   English

编码的UI BrowserWindow投射到Selenium InternetExplorerDriver

[英]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.

相关问题 麻烦在编码的UI测试中在BrowserWindow中更改CurrentBrowser变量的值 - Troubles changing value of CurrentBrowser variable in BrowserWindow in Coded UI Tests 编码的UI测试无法访问其中的BrowserWindow或DOM - Coded UI Test can't access BrowserWindow or DOM inside of it 编码的UI测试向下投射不工作 - Coded UI Tests down casting not working 硒-internetexplorerdriver兼容模式 - selenium - internetexplorerdriver compatibility mode 兼容模式下带有InternetExplorerDriver的Selenium WebDriver单击标签 - Selenium WebDriver click label with InternetExplorerDriver in Compatibility Mode Selenium 2 StaleElementReferenceException使用DropDownList和AutoPostBack使用InternetExplorerDriver时 - Selenium 2 StaleElementReferenceException When Using DropDownList with AutoPostBack With InternetExplorerDriver 如何在代理C#中使用Selenium Internetexplorerdriver - How to use selenium internetexplorerdriver with proxy c# 编码的UI和Selenium-根据鼠标指针所在的位置而不同的执行速度 - Coded UI & Selenium - different execution speed depending on where mouse pointer is 如何使用C#使用Selenium WebDriver实例化InternetExplorerDriver - How to instantiate InternetExplorerDriver with Selenium WebDriver using C# Selenium InternetExplorerDriver不使用MVC Web应用程序截屏 - Selenium InternetExplorerDriver does not take screenshot with MVC web application
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM