我成功地运行了量角器脚本。下面是我用来运行量角器脚本的protractor.config.js文件。
var Jasmine2Reporter = require('protractor-jasmine2-screenshot-reporter');
var HtmlReporter = require('protractor-html-screenshot-reporter');
var jReporter=new Jasmine2Reporter({
dest: './protractor-result',
fileNam
我正在运行一个角度应用程序的E2E测试。为了使用protractor.conf.js,我确实编辑了SeleniumStandalone。它看起来很好,我可以使用:ng e2e运行测试。
protractor.conf.js
const { SpecReporter } = require('jasmine-spec-reporter');
exports.config = {
// location of the Selenium JAR file and chromedriver, use these if you installed protractor loca
我尝试在Windows中运行一些量角器测试,但收到以下错误:
Starting selenium standalone server...
[launcher] Running 1 instances of WebDriver
Selenium standalone server started at http://10.44.10.127:55805/wd/hub
[launcher] Error: TypeError: Object #<Object> has no method 'forEach'
at new Plugins (C:\Users\user\A
我试图解决我得到的错误,同时试图运行量角器测试与phantomJS。
Exception thrown: Keeping the Selenium server alive
ERROR - Unable to start a WebDriver session.
/Users/test/projects/test/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/error.js:113
var template = new Error(this.message);
^
Unknown
我有一个Protractor测试来验证excel文件是否被正确地下载到Downloads文件夹中,然后我能够上传相同的文件。因为我将多次运行测试,所以在运行Protractor测试之前,我需要一种清除我的Downloads目录的方法。这样,以前运行的任何重复文件都会被清除。我怎么能这么做?以下是我上传excel文件的测试结果:
var fileToUpload = 'Test.xlsm';
it('Test Case: to Validate the Excel Upload', function() {
var absolutePath = pat
当执行量角器测试时,它在--headless模式下成功,但是当我删除--headless选项时,它失败了,声明:user data directory is already in use, please specify a unique value for --user-data-dir argument, or don't use --user-data-dir。 正如你所看到的,我没有使用这个特定的参数,所以我不知道该怎么做。 更新:当crome浏览器选项卡打开时,data:,出现在地址栏中。 错误 $ protractor conf.js
[14:10:17] I/launch
我正在尝试使用protractor和phantomjs运行一些e2e测试。当我运行测试时,我得到以下错误:
- Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.
测试是:
import { browser, element, by } from 'protractor';
describe('example test', () => {
it('stupid test
我正在用一个小型AngularJS应用程序测试量角器。
这是一个考验:
describe('Testing Protractor', function() {
var draftList;
it('should count the number of drafts', function() {
browser.get('#/');
draftList = element.all(by.repeater('newsletter in drafts'));
expect(draftList.count
我发现使用PhantomJS来执行量角器测试是不好的,而使用Karma测试。然而,我想做端到端测试,而不是单元测试。
端到端的意思是我想设置一些命令,让浏览器的行为像人类用户一样。因此,我不能切换回Karma。我试着使用PhantomJS和Protractor作为browsername,但似乎不起作用。如果有人可以分享有关如何使用PhantomJS和Protractor for Jenkins (CI)的知识,那么集成环境或任何其他您所知道的无头浏览器将会非常有帮助。
我使用循环运行JS和PHP测试(Protractor/ Phpunit)。
我想使用并行来赢得时间,但我不知道配置并行性。我激活循环参数(2个容器)中的并行性。
我的实际循环配置(circle.yml):
# Depend de app/config/parameters.circle.yml (parametre symfony pour circle) et app/config/apache.circle (configuration d'Apache pour Circle)
# Configuration du serveur
machine:
php:
我正在使用Chrome成功地运行Protractor测试,使用我的Protractor配置中的以下部分指定到我的铬二进制文件的路径:
capabilities: {
// You can use other browsers
// like firefox, phantoms, safari, IE
'browserName': 'chrome',
"chromeOptions": {
binary: 'C:/BuildSoftware/Chrome/Application/chrome.exe',
}
这个很管用。
我的火狐