简体   繁体   English

量角器结合SpecFlow,Selenium和C#

[英]Protractor combined with SpecFlow, Selenium and C#

I have been searching the internet for hours, but cannot really find a good answer for my situation. 我已经在互联网上搜索了几个小时,但无法真正找到适合我的情况的好答案。 Currently, I have my tests setup in SpecFlow and C#. 目前,我在SpecFlow和C#中进行了测试设置。 Basically, what I always like to do is, keep all parameters outside of the code. 基本上,我一直喜欢做的是将所有参数保留在代码之外。 (So basically: Given I go to ' http://www.stackoverflow.com ' instead of Given I go to BaseURL) (所以基本上:鉴于我转到“ http://www.stackoverflow.com ”,而不是由于我转到BaseURL)

Now as the new web application I want to test is built in AngularJS, I was advised to use protractor. 现在,由于我要测试的新Web应用程序是在AngularJS中构建的,因此建议我使用量角器。 My technical knowledge is quite limited, but the thing I want to ask you all is: 我的技术知识非常有限,但是我想问的是:

Is it possible to use protractor combined with SpecFlow and thus possible to send parameters from SpecFlow into my code? 是否可以将分度器与SpecFlow结合使用,从而可以将参数从SpecFlow发送到我的代码中? Is it possible to use protractor without the command prompt but with NUnit Test Adapter? 是否可以在不使用命令提示符但使用NUnit Test Adapter的情况下使用量角器? If it is possible, is there any easy to follow tutorial for this? 如果有可能,是否有任何易于遵循的教程?

Thanks in advance! 提前致谢!

Anand 阿南德

Here is a great article from Anthony Chu that might help. 这是Anthony Chu的精彩文章,可能会有所帮助。 There is a NuGet package for a .Net version of protractor that's built on top of Selenium. 有一个用于.Net版本的量角器的NuGet程序包,它基于Selenium构建。 I've tried it and it works well with both nunit or SpecRunner. 我已经尝试过了,它可以与nunit或SpecRunner一起使用。 The C# version of protractor lets you use the same angular specific selectors that you get from protractor but runs it on top of the Chrome WebDriver. C#版本的量角器使您可以使用与量角器相同的角度特定选择器,但可以在Chrome WebDriver上运行它。

Article from Chu , Protractor .Net . 楚的文章量角器.Net

Good Luck! 祝好运!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用C#在Specflow中生成硒报告 - Selenium Report generating in Specflow using c# selenium 的用户界面与 specflow c# - user interface for selenium with specflow c# 在 Specflow 和 Selenium C# 中使用场景大纲 - Using Scenario Outlines with Specflow & Selenium C# 使用Selenium Webdriver + Specflow + C#+ PageObject + PageFactory禁用浏览器JavaScript - Disabling browser javascript with Selenium webdriver + specflow + c# + Pageobject + pagefactory 有没有办法按所需顺序运行 Specflow 场景(C# Selenium)? - Is there a way to run Specflow scenarios in desired order (C# Selenium)? C# generics 用于在 Selenium+specflow 框架中链接页面对象 - C# generics for linking page objects in Selenium+specflow framework 使用Selenium和Specflow C#验证所有值都在下拉列表中 - Verify all values are in the dropdown list using selenium and specflow c# C#Selenium SpecFlow处理失败的测试并继续 - C# Selenium SpecFlow Handling failing tests and continuing 使用 Baseclass.Contrib.SpecFlow.Selenium.NUnit 在 @Browser:Firefox (C#/Specflow) 中运行测试 - Using Baseclass.Contrib.SpecFlow.Selenium.NUnit to run tests in @Browser:Firefox (C#/Specflow) 超时等待异步脚本结果Selenium C#Protractor - Timed out waiting for async script result Selenium C# Protractor
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM