leadfoot

Can you upload remote files with intern leadfoot

蓝咒 提交于 2020-01-17 03:14:04
问题 I'm testing a file upload feature and trying to upload remote files(e.g. https://s3.amazonaws.com/some_dir/some_file). Using type() throws an error stating the path is not absolute. Is this supported by intern? If yes, how should it be done? 回答1: Leadfoot handles file uploads like this: The test calls type on a file input element with the local (to Intern) path of a file. This file must exist on the system running Intern. You can get an absolute path to it by using require.toUrl (e.g.,

How to continue the intern test once timeout for leadfoot/Session#executeAsync calls has reached

笑着哭i 提交于 2019-12-25 14:28:27
问题 There are array of URLs to load within an application. A page ready event is fired once the page load. However, when running on sauce labs, the event does not fire on a random page and test fails. Is there any way to continue the tests if the event does not fire? return remote.get(url) .setExecuteAsyncTimeout(20000) .then(function() { var pageLoadEvent = conf.get("pageLoadEvent"); console.log("waiting for " + pageLoadEvent + " event to occur"); remote.executeAsync(function(done) { window

unknown error: failed to write prefs file

六眼飞鱼酱① 提交于 2019-12-22 04:22:15
问题 I keep getting the error while running functional tests using runner with following: -selenium 2.44 -Chrome Driver -Windows Server 2008 R2 Enterprise Error Description: Listening on 0.0.0.0:7000 Starting tunnel... UnknownError: [POST http://test.com/wd/hub/session / {"de siredCapabilities":{"browserName":"chrome","name":"tests/intern","idle-timeout": 60,"selenium-version":"2.44.0"}}] unknown error: failed to write prefs file (Driver info: chromedriver=2.12.301325

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('/

Intern: loop on Promise.<Array.<leadfoot/Element>>

一个人想着一个人 提交于 2019-12-10 10:23:18
问题 Let's say I have the following DOM structure, for simplicity: <div class='myparent'> <div class='child'> <div class="label">A</div> <div class="ico"/> </div> <div class='child'> <div class="label">B</div> <div class="ico"/> </div> <div class='child'> <div class="label">C</div> <div class="ico"/> </div> </div> I would like to loop within all child Element returned by the function findAllByCssSelector('.child'). In particular, I would click on the ico div subelement ONLY if the label of the div

How to switch iframes InternJS

我怕爱的太早我们不能终老 提交于 2019-12-08 08:33:15
问题 I need to switch to an iframe that has a dynamic name and id. <iframe name="easyXDM_1435765828615" id="easyXDM_1435765828615">...</iframe> I noticed LeadFoot has a switchToFrame() function, but when I pass it an element that was returned from find() I get the error "MoveTargetOutOfBounds: POST http.../moveto / {"element":"16"} Offset within element cannot be scrolled into view". Is there a better way to do this using execute() and some javascript, or how can I make switchToFrame() work? 回答1:

How to switch iframes InternJS

浪尽此生 提交于 2019-12-06 20:42:24
I need to switch to an iframe that has a dynamic name and id. <iframe name="easyXDM_1435765828615" id="easyXDM_1435765828615">...</iframe> I noticed LeadFoot has a switchToFrame() function, but when I pass it an element that was returned from find() I get the error "MoveTargetOutOfBounds: POST http.../moveto / {"element":"16"} Offset within element cannot be scrolled into view". Is there a better way to do this using execute() and some javascript, or how can I make switchToFrame() work? Depending on how your iframes are setup on the page you could try something like this: .switchToFrame(null)

Intern: loop on Promise.<Array.<leadfoot/Element>>

回眸只為那壹抹淺笑 提交于 2019-12-05 22:51:33
Let's say I have the following DOM structure, for simplicity: <div class='myparent'> <div class='child'> <div class="label">A</div> <div class="ico"/> </div> <div class='child'> <div class="label">B</div> <div class="ico"/> </div> <div class='child'> <div class="label">C</div> <div class="ico"/> </div> </div> I would like to loop within all child Element returned by the function findAllByCssSelector('.child'). In particular, I would click on the ico div subelement ONLY if the label of the div is B. I would remember, that findAllByCssSelector() returns Promise.<Array.<leadfoot/Element>> .