c# - WebDriverBackedSelenium 可以在 C# 中使用吗

标签 c# selenium webdriver selenium-webdriver

Selenium 2 C# 库是否支持使用 Selenium 1 命令?在 Java 中,您可以创建一个 WebDriverBackedSelenium 对象并使用 Selenium 1 命令,但这可以在 C# 中完成吗?

如果是,语法是什么?

谢谢,

哈桑

最佳答案

它与 Java 代码几乎相同。见下文

IWebDriver driver = new FirefoxDriver();
ISelenium selenium = new WebdriverBackedSelenium(driver, "http://www.google.com");
selenium.open("/");

关于c# - WebDriverBackedSelenium 可以在 C# 中使用吗,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5885744/

相关文章:

c# - 递归失败

Maven 测试 (webdriver/testng) 在不存在的文件夹中寻找资源。我怎样才能告诉它在哪里寻找它?

c# - 获取 selenium 下拉框中当前选定的选项

java - 使用Java拦截元素点击

c# - IdentityServer4 的 AddSigningCredential

c# - .NET 日期添加天数

java - Selenium 网络驱动程序错误

FirefoxDriver 总是从 "firstrun"页面开始,破坏了所有测试脚本

c# - 努力制作算法来为益智游戏生成棋盘

python - 使用 Selenium 从分类为列表框的按钮中选择值