Tag: saucelabs

如何避免通过SauceLabs远程下载文件时的“另存为”提示

从Jenkins作业运行的量angular器规格,连接到SauceLabs。 它点击一个button来下载PDF,并检查文件是否成功下载。 我无法使Chrome浏览器使用绝对path打开“另存为”提示。 如果我使用'~/Downloads'作为filename ,但是我的browser.wait等待文件存在永远挂起,我可以避免“另存为”提示。 // spec.js import fs from 'fs' import path from 'path' fs.mkdirSync('./downloads') describe('Clicking DOWNLOAD button', () => { it('should download a proposal', () => { const filename = path.resolve(__dirname, './downloads/proposal.pdf') if (fs.existsSync(filename)) { fs.unlinkSync(filename) } page.downloadProposalBtn.click() browser.wait(() => fs.existsSync(filename), 180000) .then(() => { expect(fs.existsSync(filename)).toBe(true) }) }, 180000) }) 以下是我的conf文件的相关部分。 我期望的prompt_for_download设置,使提示不显示,但它.. // […]

使用量angular器+ Appium + SauceLabs

我一直在尝试自动对移动我的量angular器testing。 我已经阅读了大部分的networking博客,我到达了这个与Saucelabs的Appium“官方”: https ://docs.saucelabs.com/tutorials/appium/#mobile-web-application我遵循指示在那里,并configuration我的config.js文件 var testName = 'Testing'; //Change Project's name here in order to be identified in BrowserStack exports.config = { // The address of a running selenium server. seleniumAddress: 'http://bmsoko:[redacted]@ondemand.saucelabs.com:80/wd/hub', // Capabilities to be passed to the webdriver instance. multiCapabilities: [{ name: testName, 'appium-version': '1.4.0', 'browserName': 'Android', 'deviceName': 'Android Emulator', 'deviceOrientation': 'portrait', 'platform': […]

酱实验室量angular器,格式不正确的URI

我的量angular器configuration是: exports.config = { baseUrl: 'http://www.onet.pl', directConnect: false, sauceUser: 'myuser', sauceKey: 'mypassword', capabilities: { 'browserName': 'chrome', 'chromeOptions': { 'args': ['show-fps-counter=true', '–allow-running-insecure-content'] } }, } 当我尝试启动testing时,出现以下错误: [12:57:56] I/sauce – Using SauceLabs selenium server at http://ondemand.saucelabs.com:80/wd/hub [12:57:56] I/launcher – Running 1 instances of WebDriver [12:57:56] E/launcher – URI malformed [12:57:56] E/launcher – URIError: URI malformed at decodeURIComponent […]

Selenium WebDriver:dragAndDrop方法在IE11和IE10中失败

我们一直在使用SauceLabs来进行我们每晚的Jenkins CItesting。 我们已经在Windows 8下运行了testing,没有任何问题。 现在我们要扩展testing并在更多的平台和浏览器上运行它们。 我们的目标是在Windows和OSX以及IE11,10和9下的最新Firefox和Chrome浏览器中运行testing。 testing是使用node.js客户端为webdriver / selenium2编写的https://github.com/admc/wd 我现在的问题是让我们的dragAndDrop方法在IE11和IE10中工作。 它在最新的Firefox和Chrome和IE9中运行良好。 代码: dragAndDrop: function (elem, x, y) { var i = 0, parent = elem.elementByXPath('..'), offsetX, offsetY, pos, offsetPos, size; offsetPos = this.getLocationInView(elem); pos = this.getLocationInView(parent); size = this.getSize(elem); offsetX = offsetPos.x – pos.x + ~~(size.width / 2); offsetY = offsetPos.y – pos.y + ~~(size.height […]

我如何将自定义数据传递给我的摩卡testing?

我们正在使用酱汁实验室进行跨平台/跨浏览器testing。 你可以在这个要点find我的testing套件(以节省这个问题的空间): https : //gist.github.com/chevex/397a5a18a1a386897b41 问题是,我能弄清楚如何将自定义数据传递给testing套件的唯一方法是通过一个环境variables 。 因此,当我的gulp任务试图并行运行testing套件对多个目标时,它们最终都会针对同一个目标运行,因为循环完成迭代,并且process.env.SAUCE_TARGET被设置为第一个套房甚至运行。 var gulp = require('gulp'); var gulpMocha = require('gulp-mocha'); var mergeStream = require('merge-stream'); gulp.task('sauce-tests', function () { var targets = ['chrome', 'firefox', 'internet explorer']; var streams = targets.map(function (target) { process.env.SAUCE_TARGET = target; return gulp.src('./test/sauce-tests.js', {read:false}) .pipe(gulpMocha({ reporter: 'spec' }); }); return mergeStream.apply(null, streams); }); forEach提供的闭包没有帮助,因为它在每次迭代中设置一个基本上全局的值( process.env.SAUCE_TARGET )。 […]

使用量angular器/ saucelabs禁用输出

有什么办法可以在使用下面的量angular器/ saucelabs / gulp示例输出时禁用/压缩启动器输出: [firefox #2] [firefox #2] [firefox #2] rawFlowsForLast ✓ should return a valid es result [firefox #2] [firefox #2] Main Page ✓ should have a title (4840ms) [firefox #2] [firefox #2] [firefox #2] 2 passing (5s) [firefox #2] 我很想停用以[firefox#2]开头的行,只保留testing结果输出。 理想情况下,它会像我的摩卡输出的其余部分格式化好。 我敢肯定,我可以想出办法手动压扁它,但似乎应该有一个选项来控制输出。 我的大文件在这里