intern

Events after clickMouseButton

你。 提交于 2019-12-12 05:27:32
问题 In one of my tests I have the mouse moved to a specific location and then clickMouseButton() is called. This action is to change the data that is displayed (paging the data.) However, after the click, when I try to get the text in a column of the table to verify that the data changed the data changes back to what was originally displayed and my test fails. My test code is: return Remote .moveMouseTo(JE.Buttons.Scrolling(), 5, 100) .clickMouseButton() .end(Infinity) .sleep(500) .findByXpath('/

How to take a screenshot with local browser (FF) and write to file in intern javascript

 ̄綄美尐妖づ 提交于 2019-12-12 04:36:50
问题 I'm using theintern framework for functional testing and running browser locally (Firefox). Is there a way to capture screenshot and write this to a file? I tried the following example below (answer to similar questions on this site) but I get the following error "TypeError: Object �PNG has no method 'replace'. I'm newbie to this intern framework and javascript. Thanks. Here is what I have and typical answers I'm seeing: define( [ 'intern!object', 'intern/chai!assert', 'intern/dojo/node!fs' ]

Dojo 1.9 and Intern 1.7 - require.on is not defined?

≯℡__Kan透↙ 提交于 2019-12-12 02:47:12
问题 Dojo 1.9 and Intern 1.7 I am having a problem with Intern in that it's reporting that require.on is not defined and my test suite is falling over. This is only happening when trying to define a test that includes a widget. it looks like when the widget package is requried then it hits a line require.on("idle", onload) but fails because require.on is undefined. As a test, I defined require.on and the test does not fall over. All I can think of is that the version of dojo that intern ships with

Node Inspector not hitting breakpoint for Intern test

耗尽温柔 提交于 2019-12-12 02:44:19
问题 I am trying to debug my intern test using node inspector. I followed all the steps correctly from here. I gave it a run by performing the following command Start Selenium[for intern test] Run the intern test in node environment C:\node\node --debug-brk node_modules/intern/runner.js config=tests/intern In another cmd I run the node inspector node-inspector --web-port=9999 & Start the browser http://127.0.0.1:9999/?ws=127.0.0.1:9999&port=5858 I can see all the script of my project. I have break

Working with intern.js and browserstack, access the remote browser environment

时光怂恿深爱的人放手 提交于 2019-12-12 02:18:31
问题 I'm trying to perform a basic functional test: define([ 'intern!object', 'intern/chai!assert', '../Request', 'require' ], function (registerSuite, assert, Request, require) { var request, url = 'https://github.com/theintern/intern'; registerSuite({ name: 'demo', 'submit form': function () { return this.remote .get(require.toUrl('./fixture.html')) .findById('operation') .click() .type('hello, world') .end() .findById('submit') .click() .end() .setFindTimeout(Infinity) .findById('result')

Intern and client paths in version 1.1.0

穿精又带淫゛_ 提交于 2019-12-11 19:38:31
问题 I noticed with release 1.1.0 that modules are not considered siblings of intern anymore. For example, I used to be able to run something like http://localhost/intern/client.html?config=myproject/tests/config but it appears to try to attempt to fetch it from http://localhost/intern/myproject/tests/config.js instead as of previously http://localhost/myproject/tests/config.js . Is this intentional? Also, I tried to prepend ../myproject/tests/config but it still apears to be fetching it relative

intern Functional Testing with Frames

為{幸葍}努か 提交于 2019-12-11 12:35:33
问题 I'm using the intern and writing some functional tests. The application I am testing uses a lot of Dojo tabs and iframes and I'm having some trouble navigating around with my functional tests. I can select the iframes using the "frame()" call and this is fine for accessing the nested iframes. However how do I navigate back up? Selenium WebDriver has a defaultContent to return you to the top most frame but I can't find an implementation of this in the Intern WD. The problem I am having is that

Is it possible to use dojo/text! in an Intern functional test?

六眼飞鱼酱① 提交于 2019-12-11 11:17:39
问题 Is it possible to use "dojo/text!" in an Intern functional test? I am able to setup my test page as a JSON string, but ideally I'd like to externalise the string in a file for ease of editing. I'm just getting started with Intern at the moment so I'm just experimenting with what's possible, but here is the start of my test code). This works with the commented "testData" variable used, but is currently failing when I try to provide the same String by the dojo/text! statement. Code: define([

How to set the timeout of a functional tests with the Intern?

↘锁芯ラ 提交于 2019-12-11 10:37:21
问题 I'm using Intern to write functional tests against a web app, and I would like to define a timeout > 30s (30s is the default timeout for Intern tests) for each of my functional tests. I cannot find anything related in the documentation. Does anybody knows how to do this ? Thanks for your help ! 回答1: This information is available in the Asynchronous Testing documentation. Set this.timeout from within the test to a value in milliseconds. 来源: https://stackoverflow.com/questions/19861678/how-to

Use helper modules for repeated, ordered tasks when functional testing in intern

大憨熊 提交于 2019-12-10 12:05:08
问题 I'm trying to create a module that will fill in form inputs when functional testing, and I'd like to be able to call it from multiple test suites. Pseudo code for the helper file (helper.js) module.exports = { fillForm: function() { this.findByCssSelector('#firstname') .click() .pressKeys('John') .end() }, anotherFunction: function() { // more code } } In the spec for the functional test, I load that module as helper and I can see it execute. However, it seems I can't use this syntax and