Questions tagged [leadfoot]

Leadfoot is a JavaScript client library that brings cross-platform consistency to the Selenium WebDriver API.

0
votes
1answer
14 views

How to pass value from execute to another command using intern and leadfoot

Basically I'm trying to resize the screen to full height and width using values returned from the execute function. I'm struggling to figure out how to pass the values from the execute function to my ...
0
votes
1answer
26 views

how to wait for all redirects to finish using intern/web driver?

I'm trying to test that the application redirects the user away from the authenticated route since they are not an admin. But I need a way to wait for all redirects to finish before I call ...
1
vote
1answer
26 views

What happens in the browser before the actual functional tests are run

When running Intern functional tests in the browser (not headless), I notice that a bunch of different things happen before the tests are actually run. Some things that happen are navigation to ...
0
votes
1answer
19 views

Inter findByXpath ignore previous selection

I'm having issues with findByXpath ignore previous selection (selection done with the findXxxxxXxxx Commands). My Page object looks like this class DeleteModalUiComponent { constructor(...
0
votes
1answer
28 views

How to use intern leadfoot waitForDeletedByXpath function?

On what scenario can i use intern's leadfoot waitForDeletedByXpath function? From the documentation, what I understood is this method waits for the element to become invisible in Page. But while ...
1
vote
1answer
78 views

How do you use pollUntil with intern 4 functional tests

I'm writing intern 4 functional tests. When I try to use pollUntil it is undefined .findDisplayedByCssSelector('button.primary') .then( el => pollUntil(function(pollEl) { if( pollEl....
1
vote
1answer
46 views

Simulating hotkeys in Intern (3) functional tests

I'm trying to test some hotkeys on my site. Typing Ctrl+5 in a field should do something. I'm doing: command.get(...) ... .findByCssSelector('input') .click() .pressKeys([keys.CONTROL,...
0
votes
2answers
59 views

The function setFindTimeout does not work for me

I write functional tests for the web application on Intern. I have a file in which I describe all the actions on the test, and also there is a test where these actions are called for example: there ...
1
vote
1answer
82 views

How to take screenshots inside execute or executeAsync using Intern

In this test I'm working on, I'm using executeAsync() to catch some events of the page being tested. I don't know the number of events that are going to happen and for each one that it's catched I ...
0
votes
1answer
44 views

TheIntern - determining the environment for dynamic test generation

I have a situation in which I need to dynamically generate functional tests. Basically, I want to use BrowserStack to run my tests on a variety of different environments, but I want to register a ...
0
votes
1answer
37 views

In intern.js Leadfoot, how can I determine what device / browser I am running on?

I have a test suite using theintern that I run on a whole array of different browsers and devices via BrowserStack. I would like to be able to take some slightly different actions on mobile vs ...
0
votes
1answer
25 views

How can I simulate a mobile device with intern / leadfoot

I would like to test our mobile site but it is only served if we simulate a User Agent via chrome's device mode. How can I use the leadfoot API to simulate a mobile device such as an iPhone?
0
votes
0answers
36 views

Intern Functional Testing, how to iterate array of elements [duplicate]

First let me say that I am fairly new to intern and Leadfoot API. What I am trying to do is iterate through an array of elements and perform an assertion on each of them. Here is my code: 'Alerts': ...
0
votes
1answer
92 views

Intern framework - LeadFoot - unable to locate element

I am writing functional test cases using leadfoot intern framework. Test Case: Enter the form field and click a button which will open up a bootstrap modal. All i am trying to do is verify the display ...
1
vote
2answers
69 views

Click on each first child radio (undefined child length)

I would like to click each first child of class="cf" and should be in order, first cf first because the other radio is disabled unless you click the first one. The cf length is undetermined (in this ...
0
votes
1answer
110 views

How do I catch an exception in intern JS?

I have the following snippet ,clickStaleElement: function(remote, id) { return remote .findById(id) .execute(function(id){ //force org.openqa.selenium....
0
votes
1answer
341 views

How do I click and type on element in the shadow dom using intern

I have a Google Polymer Project that I am trying to implement functional testing with Intern, which can be found here: https://theintern.github.io/ The code I'm trying to test is in the Shadow DOM,...
0
votes
1answer
102 views

Get Number of element returned by findAllByXpath in leadfoot

How to get the count of the element returned bythis.remote.findAllByXpath() in intern js (leadfoot).
0
votes
1answer
32 views

How do I test a view library in intern.js?

I am building a library which uses backbone as a base. My library has a View class, which is an extension of Backbone.View. It has an HTML Element as a property of it. I have a bunch of new functions ...
0
votes
1answer
265 views

How to open new browser window in intern js?

I am automating the UI test of my application. There are some cases when i want my test script to close the current browser and and run next test by opening new browser. The problem is that I am ...
0
votes
1answer
119 views

“Unable to find element on closed window” error when finding an element after going to another url

In the test I'm clicking a menu button that go to another page. Afterwards, when I try to find any element on page(The page exists, i can see it), the error 'unable to find element on closed window' ...
1
vote
1answer
140 views

Intern / Leadfoot: How to get HTTP status code

How can I determine the HTTP status after moving to some page using intern? this.remote.get('http://google.de') // status 200 this.remote.get('http://google.de/alsdflasdf') // 404 Not Found
0
votes
1answer
72 views

Can I use Selenium methods together with Intern/Leadfoot methods?

I would like to use some Selenium methods together with Intern/Leadfoot methods. How can I do it? Do I have to do it after promise returned, right? Like the following code? Are there other ways to do ...
0
votes
1answer
144 views

Method acceptAlert() doesn't work in Intern/Leadfoot

I can't understand how to use the acceptAlert() method. It doesn't work for me. I try to accept a pop-up alert with two buttons: Ok and Cancel. Here is a piece of my testing code. queryDatasource: ...
1
vote
1answer
264 views

How to get page source data from div HTML tag?

Is there a method in Intern/Leadfoot to get source content or at least a raw text from <div> HTML tag? I looked for it in the following reference but without success. https://theintern.github....
1
vote
1answer
274 views

Failed to load module an installed module in Intern/Leadfoot

Meta - OS: Ubuntu 14. Selenium Version: 2.53 Browser: Chrome. Browser Version: 51.0.2704.103 (64-bit) Expected Behavior - The selenium-driver is imported. Actual Behavior - The selenium-...
0
votes
1answer
33 views

Intern: Is it possible to mark a test as pending / disable it?

How can I disable a functional test in intern other then using comments? We are using the Object Interface.
4
votes
2answers
198 views

Why does a bunch of leadfoot stuff run in the browser when starting my intern test?

All, Thank you in advance. I am running a single functional test using intern and local selenium. When I start the test, the following happens: Chrome opens Lots of stuff runs (not mine). My test ...
-1
votes
2answers
591 views

executeAsync not passing return value to callback

I'm using intern JS/leadfood testing framework. I'm using executeAsync. I expect the return value from executeAsync to be passed to the callback to executeAsync, but this is not happening. Should the ...
0
votes
1answer
215 views

Can you upload remote files with intern leadfoot

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 ...
0
votes
1answer
138 views

Error when trying to switch back to the original browser window using intern leadfoot

I'm getting the following error when I call switchToWindow(handle): null value in entry: name=null The original window is still open when I try to switch and handle is not null or empty. Here is the ...
0
votes
1answer
128 views

Intern/Leadfoot : Getting error - Expecting a function in instanceof check, but got [object Object] on .Click() method

I am learning Intern/leadfoot and trying to write a simple test. The test is logging an user to the site and logging out the user after verification on the next page. Using Chromedriver v2.21. ...
0
votes
1answer
48 views

Leadfoot + sauce: mapping a collection of elements using getAttr fails in mobile only

My use case varies for this, but in general i'm trying to collect a bunch of elements and then apply _.map() to each. The problem is that this series of .getAttribute() calls can cause a test that ...
0
votes
1answer
61 views

Log out afterEach test- intern + leadfoot

Trying to test some user permissions here, and i'm having trouble logging out after each test... afterEach: function () { return this.remote .clearLocalStorage() // .clearCookies(); }, ...
2
votes
1answer
144 views

Chain operations after several elements have been retrieved

For testing we have to fill a complex page using intern/leadfoot. Each part of the page is taken care off by a separate function which receives the necessary elements and input data. Now we have the ...
1
vote
0answers
150 views

Entering text in reactjs input fields with intern leadfoot

I'm testing a reactjs app and the type() and pressKeys() commands are not working correctly. type('string') isn't entering text into the input field and pressKeys('string') is only entering 's'. I'm ...
0
votes
2answers
694 views

In Intern.js Leadfoot, how do I preform a CTRL Click

I'm just wondering what the preferred way to preform a ctrl + click action in leadfoot is. In java I would have used the Actions class and used keyDown, but since we have moved to a JS based framework ...
1
vote
1answer
127 views

Using variable in Intern functional test

I need to use a variable whose value is determined based on the css style pixel. The test find the value of left pixel and then select a particular cell. But when i run this test the value is always ...
1
vote
1answer
768 views

Intern reporting and error handling

I started reading about automated testing of web apps a couple of days ago, and after a lot of trial and error (and tutorial) finally somehow managed to run couple of Intern functional tests both ...
2
votes
1answer
231 views

Leadfoot moveMouseTo requiring X/Y offsets when element is present

In the docs for leadfoot Command#moveMouseTo it states that every argument is optional (https://theintern.github.io/leadfoot/Command.html#moveMouseTo). When I pass in an element without passing in X ...
0
votes
1answer
46 views

Events after clickMouseButton

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, ...
0
votes
0answers
112 views

How to avoid UnexpectedAlertOpen - Intern Leadfoot

I have a written a intern functional test which copies data from one cell and pastes it to another cell. The problem is every time run the test and copy the data I get a dialogue box with the message ...
1
vote
2answers
475 views

How do I clear input field in Intern JS?

I have written a small piece of code for inline editing table fields. When the user clicks, the element is removed and on its place an input field is created. After modification is done the input ...
0
votes
1answer
541 views

Intern leadfoot (element not visible) : Wait till element is visible using isDisplayed?

I am trying to test the login dialogue of my application. There is a wait until an element with class name "LoginDialog" is added to the DOM. However, the dialog doesn't appear right away anymore on ...
0
votes
1answer
345 views

iterating over elements using Intern/Leadfoot

There are 2 places below where code (in Javascript) is never executed although it appears as though it should. See code below were the comment says 'THIS CODE NEVER GETS EXECUTED'. I happen to be ...
0
votes
1answer
122 views

Multiple THEN statements in intern functional test

I have a test that will do something and test that x is visible - 'WHEN something THEN x is visible': function () { var myClass= new MyClass(this.remote); return myClass ...
1
vote
1answer
373 views

How to proceed AFTER switching frames in InternJS

Can someone tell me how to proceed with referencing an element within an iframe after the switching of frames is done? I've already looked at the solution presented in How to switch iframes InternJS ...
1
vote
2answers
331 views

Hide password in functional tests using the Intern / LeadFoot / Selenium

I am using the Intern for my functional tests. One such test requires being logged into an admin account: registerSuite({ name: 'login', 'login': function() { return this.remote ...
0
votes
2answers
433 views

Why does a click handler NOT run in Leadfoot?

I am trying to write functional tests using Intern framework which uses Leadfoot library to implement WebDriver API as I am using Selenium Grid setup to test my webapp on remote browsers. The app is ...
0
votes
1answer
220 views

Intern:Leadfoot - testing drag-n-drop

I have a webapp that uses dojo widgets and drag-n-drop functionalities and I'm using Intern in order to test it. Now I want to test the drag-n-drop mechanism, and for this I hoped to use the Leadfoot'...