小编Bru*_*oko的帖子

标签Protractor + Jasmine来运行套件

我试图找出一个办法以同样的方式使用,或者还好说,类似的方式,该标记选项cucumberJS用了protractor,但与JasminE,有没有办法来标记不同的场景,如:@smoke,@regression等等.然后告诉控制台运行那些?

我拒绝使用Cucumber,因为它的支持它似乎变得片状!

任何帮助都感激不尽!

javascript jasmine protractor cucumberjs

8
推荐指数
2
解决办法
3921
查看次数

如何重用 Jasmine 测试

我在 Jasmine 中有以下测试,我需要对 2 个不同的 URL 执行,这 2 个 url 是同一产品的不同版本:

describe('TEST ',function(){
    var basePage = new BasePage();
    var page1 = new Page1();

    describe('TEST',function(){

        beforeEach(function(){
            browser.get('URL-1.html');
        });

        it('REUSE THIS TEST' , function (){
            browser.wait(EC.visibilityOf(viewerWidgetPage.videoPlayer));
            page1.videoControls.click();
            expect(basePage.hasClass(page1.videoPlayer, 'vjs-playing')).toBeTruthy();
            page1.audioControl.click();

            //Verify that the video property is muted.
            browser.executeAsyncScript_(function(callback){
                callback(window.player.muted());
            }).then(function(isMuted){
                expect(isMuted).toBeFalsy();
            });

            page1.audioControl.click();

            //Verify that the video property is muted.
            browser.executeAsyncScript_(function(callback){
                callback(window.player.muted());
            }).then(function(isMuted){
                expect(isMuted).toBeTruthy();
            });


        });

    });
Run Code Online (Sandbox Code Playgroud)

有没有办法在另一个测试中使用“它”“重用此测试”?

javascript testing automation jasmine protractor

5
推荐指数
1
解决办法
455
查看次数

量角器-茉莉花-下载文件到相对路径

我已阅读并关注以下问题及其评论/答案:

问题1

问题2

问题3

但是找不到不使用的方法absolutePath,因为我需要在另一台机器上运行此测试,因此,我需要相对于项目,而没有相对于其外部的其他文件夹。我该怎么做?

jasmine selenium-webdriver protractor

2
推荐指数
1
解决办法
1549
查看次数