The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [javascript]

JavaScript is a dialect of the standardized ECMAScript programming language, primarily used for scripting web-pages.

Filter by
Sorted by
Tagged with
3
votes
3answers
9k views

How to handle windows authentication pop up with Protractor?

Use case: When URL loads, it request for Windows authentication (Enter Username and Password). How it goes is: loads the url on clicking Post button in the page. Windows Authentication pops up ...
1
vote
0answers
3k views

WebdriverIO browser.scroll() always scrolls to the top?

I am using WebdriverIO and I want to scroll to an element. But no matter if I'm using element.scroll() or browser.scroll(0,yLocation) it will always scroll to the top of the page. Is it possible ...
1
vote
1answer
2k views

How to verify column count using protractor

I need to verify the column count of a table based off of the security role of the logged in user. How can I verify that in some instances 5 columns are displayed but in other instances 4 or 3? The ...
2
votes
1answer
3k views

How to close print dialog box in protractor test

I am doing end-to-end testing with protractor. In a certain test, I need to test like print button is creating pdf or not. So When Test clicks the button, It opens the print window dialog like below. ...
0
votes
1answer
2k views

How to verify that the menu items (tab/column Elements) are clickable? or Unclickable?

Test Case In My web page, I have 5 tabs (A,B,C,D,E) in which 2 tabs (A,B) are clickable and 3 Tabs(C,D,E) are not clickable. Write a script to verify those tab elements are clickable or not. What ...
0
votes
1answer
576 views

Is the any possible way how i can check that nprogress.js is done using selenium webdriver?

I'm stuck a bit with that issue. I need to stop my test scenario execution until progress bar is visible. Progress bar is handled by nprogress.js I was thinking about to catch it (progress bar) as ...
3
votes
1answer
2k views

PhantomJS not rendering all of page even with a few seconds delay

I am using my linux box to try and periodically download my local skateboard park's webpage and search for whether there are free skate-school lessons available. I'm currently falling at the first ...
1
vote
1answer
595 views

Handling unstable remote selenium server connection

We are currently running end-to-end tests on BrowserStack and tackle flakiness of tests on a daily basis. One of the recent problems was that rarely Protractor temporarily loses connection to the ...
8
votes
3answers
837 views

End-to-end tests are running for 5 hours

This is a continuation of Speeding up end-to-end tests topic, but a more specific one. Currently, it takes ~5 hours for our daily end-to-end testing run to complete. What can we do to improve on ...
1
vote
1answer
956 views

Verify baseUrl with prepended/appended text in protractor test

I'm using a baseUrl in the config file and some tests access links that have prepended/appended text to the same url that needs to be verified. How can I verify the clicked url while using the baseUrl?...
-1
votes
1answer
776 views

I'm unable to install protractor [closed]

Error in cmd C:\Users\user>npm install -g protractor npm ERR! Windows_NT 6.1.7601 npm ERR! argv "E:\\Software\\nodejs\\node.exe" "E:\\Software\\nodejs\\node_modul es\\npm\\bin\\npm-cli.js" "...
5
votes
1answer
80 views

What is quality javascript in the new world of es6+

Javascript has changed hugely in the last five years with es6 Now we have choices about whether to use let, const or var We can choose whether to use arrow functions to reduce code verbiage Is ...
1
vote
2answers
6k views

Protractor: How to verify text present in the table row?

TestCase: Verify the table ROW contains text. To verify text present in Table Row, i tried Using "expect.gettext().toContain(datefinal)". But ouput returns "Expected '7/18/17' to contain undefined."...
-1
votes
1answer
32 views

Ember - best way to test on-change function dropdown

I am writing an ember acceptance test. I have a text area that will trigger a drop-down each time a new character is entered. I'm not sure what is the best way to test that the drop-down appears ...
4
votes
1answer
209 views

Given When Then - is one 'then' per test acceptable usage?

I don't know if this has a sort review process, but here goes (direct me elsewhere if appropriate) I have written these tests, and wondered if my use of Given, When and Then was correct. I ask ...
1
vote
2answers
79 views

Options for @findAll in protractor

I want to use two identifiers for the same element and use the first one found. With Java, we have @findAll. Is there any way to that with javascript protractor? Any function/options or something ...
-2
votes
1answer
979 views

Advantages and disadvantages of learning Python Vs learnng Javascript?

I work on automation scripts written in selenium using Java at my current job. I want to expand my skills and learn a scripting language to help with more advanced UI automation. After research I ...
1
vote
1answer
513 views

Not Able to Login to Ebay using Selenium

I am trying to Login to Ebay site using Selenium. I have successfully identified the user name and password Text boxes using Xpath (and validated the xpaths using the Firefox Eval tool in Firebug). ...
1
vote
1answer
3k views

Change a URL to be environment specific in protractor test

I have a protractor test that locates a URL on a page. The URL is then clicked and expected to contain specific text. The URL needs to be manipulated before the browser opens it, how can I change the ...
5
votes
2answers
2k views

Speeding up end-to-end tests

When we execute the same set of end-to-end browser-automated tests on BrowserStack, we notice a dramatic slowdown - tests are much slower than if executed locally and there are occasional failures ...
2
votes
1answer
296 views

Average protractor test script length?

Looking for protractor best practices of sorts, is there any recommended 'average' length or size of an individual end to end test? Our platforms features are all highly dependent upon on another so ...
1
vote
1answer
852 views

Add reusable code to existing protractor page objects file

I inherited 45 spec files with correlating page object files that are used only to locate elements on the pages. I am trying to create reusable code, is it best practice/can additional exports be ...
2
votes
4answers
521 views

Xpath for sign out button

I am trying to find out XPath for this "Sign Out" button, can anyone help me?
1
vote
1answer
4k views

Locating ng-click in protractor

I cannot figure out how to locate ng-click in the page object file for the code below: <a ng-click="toggleGuestParams('personal')" class="ng-click-active">Select/Unselect All</a> There ...
6
votes
1answer
142 views

Test Quarantine in Protractor

Follow-up to How to deal with flaky tests? One of the approaches to tackle flaky tests is to temporarily quarantine the tests - move them to a special "bucket" with other flaky tests: I offer one ...
4
votes
1answer
239 views

What to use for user acceptance testing for a single page application?

The app uses a javascript framework to update the single page. Ajax is used for data updates How I can automate user acceptance testing for it? Usually I use selenium through through the capybara ...
6
votes
2answers
1k views

Switching from JavaScript to TypeScript for Protractor e2e tests

Not very long time ago, Protractor itself migrated to TypeScript internally. I've also heard and seen several Protractor test projects moving to TypeScript. We have a rather big and growing test ...
0
votes
2answers
6k views

How to handle Javascript dropdown menu in Selenium?

I'm trying to select a drop&down menu, select an option but I can't do it and I don't know how The code is: <div class="jqx-menu-popup jqx-menu-popup jqx-menu-popup-officeWFM2" style="border: ...
10
votes
2answers
578 views

Detecting complicated CSS selectors

This is a follow-up to What makes a good selenium locator? Motivation I've been thinking about detecting the complexity of CSS selectors statically. The scope I'm working in is both test-automation ...
5
votes
1answer
59 views

How to unit test the plethora of js frameworks?

There's a bunch of popular javascript frameworks such as Angular React Vue Ember Meteor What tools exist for unit (white box) testing each of them? Does each framework support its own unit testing ...
2
votes
0answers
554 views

Unable to add/attach screenshot and test steps in Report

I am working on protractor and using "protractor-angular-screenshot-reporter" to generate the report.But i am unable to add screenshot and test steps in this report.Can any one please help me in this....
2
votes
1answer
1k views

Attaching screenshots to JUnit test reports

We run our tests on Jenkins using Protractor generating a JUnit XML test report via JUnitXmlReporter from jasmine-reporters. Is it possible to attach screenshots, with the current state of an ...
4
votes
3answers
307 views

How to profile end-to-end tests to find the slow ones?

The Story We have a big end-to-end test codebase written in Protractor/WebDriverJS. We are using jasmine-spec-reporter for the command-line test reports. It reports test execution time for every ...
1
vote
2answers
1k views

Selenium bypass basic authentication on images

I have a a set of end to end tests that run on our app, and need to run against development, staging and production environments. The staging env is what is causing the issue. The problem: The ...
1
vote
0answers
467 views

Unable to run the Protractor tests in safari browser and build failed

My safari browser unable to locate the elements also and used so many delays: My Configurations are: iMAC Version: 10.11.6 OS X El Capitan Safari Version: 10.0.3 Protractor version: 5.1.1 ...
3
votes
1answer
407 views

Using Functional programming for UI Test automation

From what I have read about functional programming, it is considered to be more concise, more testable, and have fewer side effects. Would it be good to use for UI test automation? Context: I am ...
2
votes
1answer
4k views

Wait for element change not present (WebDriver/JavaScript/Jest)

Yesterday I struggled with waiting for a loading indicator to be removed. Added this question and answer here because we spend a lot of time on it and Google didn't help much. Hopefully this will help ...
2
votes
2answers
61 views

Work requires answering dozens of drop down questions that are almost always the same. It is written in Java, can I automate answering them? [closed]

My google skills have added little to my knowledge of this subject. I apologize for not having a better background in this topic, however if I continue to answer these redundant questions I may break,...
2
votes
2answers
92 views

UI Test framework from the ground up

I have explored some test automation tools and I thought I'd go with WebDriverJS (Selenium/JavaScript using Node.js) with Mocha as the test framework. I have been able to write out scripts that do ...
0
votes
1answer
31 views

How to assign javascript variable to last character of a string

Hello I am trying to implement automated test scripts using NewRelic. I am engineering javascript such that I print the last character of a field on the page that is always 8 characters. I have this:...
0
votes
1answer
273 views

How can I find text for span within span?

Following is my code: <span id="agText" class="ag-header-cell-text"> <span style="height: 100%;">Coordinator</span> </span> I was trying the following: var cordinator = ...
1
vote
3answers
2k views

How can I locate the navigation element by text?

<li class="nav-item" ng-reflect-ng-class="nav-item,"> <a class="nav-link" href="javascript:void(0);"> <span>By Coordinator &amp; Salesman</span> <!-...
0
votes
1answer
196 views

Implement Hiptest action words in JavaScript

I have set up a test plan in Hiptest and am working on the setup/ teardown for my tests using JavaScript. I have hit a blocker with my goal of using Hiptest with just JavaScript frameworks (mocha and ...
1
vote
2answers
17k views

Handling DropDown using Protractor

I am facing issues with handling a trivial scenario during automation. I need to select a specific option using Protractor. I am passing the index of the option that I want to select, and then ...
1
vote
2answers
3k views

Help with how to convert Selenium IDE HTML to JavaScript for WebDriverIO

We plan on using Selenium with JavaScript, so I got Selenium Webdriver with WebDriverIO. I can successfully create a js script and run it via Test Runner. But being a Selenium noob, I also got ...
3
votes
1answer
8k views

How to get selected option text from a select box selenium node js

How to get the selected option's text using selenium webdriver node.js. In java we can use getFirstSelectedOption but it is not working in node.js. How it is possible? Here is my sample code. driver....
2
votes
2answers
43 views

I'm a little confused on how unit tests run in Rails (or an MVC Framework)

So I'm starting to learn how to write unit tests, and I'm starting with Rails (I've fixed a few Rspec tests to start, but now I'm writing Javascript ones). I understand at least the basics of an MVC ...
2
votes
3answers
204 views

Emulating Wallaby.js test runner

Does anyone know of any tools like Wallaby.js, or combinations of various tooling and solutions that would help one achieve a comparable/similar testing workflow, i.e. instant feedbck as you make your ...
1
vote
1answer
48 views

Creating abstract test in Intern js

In the application I am working on for UI testing with intern. There are certain modules that have similar components and functions. So I'm trying to figure out the way to create an Abstract test for ...
2
votes
1answer
1k views

Is paypal sandbox too flakey for Selenium Webdriver automation?

I am using webdriver JS, which runs on Node js. I just pulled an all-nighter (9 hours) trying all sorts of things to automate a paypal express checkout flow reliably (no flakyness). To do this, I ...