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
2
votes
4answers
697 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
167 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
277 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
2k 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
9k 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
654 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
65 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
581 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
386 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
2k 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
529 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
491 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
5k 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
62 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
95 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
33 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
387 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
209 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
20k 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
4k 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
11k 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
50 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
206 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
53 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 ...
2
votes
1answer
3k views

Rerun failed (flaky) tests with Jest

We are using Jest as our test runner for our JavaScript (React and Selenium) tests. We have one or two flaky tests (as TeamCity marks them flaky and we process them as technical-debt), although we ...
1
vote
1answer
15k views

Cannot load JDBC driver class 'com.mysql.jdbc.Driver' in Jmeter [closed]

When you running below Jmeter test plan then "Cannot load JDBC driver class 'com.mysql.jdbc.Driver' response message given. Can any one have any solution for this? Response code: null 0 Response ...
1
vote
3answers
21k views

How to find Scroll bar xpath?

I am working for a website automation testing. I need to scroll many times. How to find a Scroll bars`s Xpath in a browser ?
2
votes
2answers
1k views

How to test export functionality?

I have a scenario to test where I need to test that the export functionality is working properly or not. I know that usually in these cases, firstly we check the availability of file in location and ...
0
votes
3answers
907 views

How to Automate web services using JMETER?

How to Automate web services using JMETER? I need to check URL links are working and image are loading properly and with the response code given. see more details in below example, i just want to ...
10
votes
3answers
13k views

Why should we use javascript for UI test automation?

Background:JavaScript based automation frameworks heavily depends on asynchronous execution, promises, callbacks, anonymous functions, etc which are inherently complex and probably an overkill for a ...
1
vote
0answers
34 views

What are some recommended selenium strategies for deal with long list of input options that update a live preview? [closed]

I am testing an app that loads an email in an iframe. Next to the iframe is a long list of options (hundreds of options). Writing text in an option updates email text in the iframe. selecting a border ...
1
vote
1answer
3k views

((JavascriptExecutor)driver).executeScript(“scroll(0,1000)”); Not working on Selenium Webdriver 3 [duplicate]

No matter how many javscript executor lines I use or how many times I change the scrolling positions to different numbers, Selenium WebDriver 3 always takes me to the same place on the list that is ...
3
votes
0answers
157 views

When and where does Intern.js opens browser and how to open a new browser by using intern script

I'm trying my hands at intern.js to automate my UI test. And I want to some test to run on separate browser ,i.e open new browser run test run test close browser and so on but I'm unable to ...
1
vote
0answers
590 views

How to Wait until page is fully loaded with Intern js

I was trying to automate the UI testing of an application with Intern js. But I am having a problem finding the way to wait until the page is fully loaded. After researching for a while, I found ...
3
votes
1answer
561 views

WebDriver Error Cannot use 'in' operator to search for 'String' in false

I have been using selenium webdriver with protractor for more than a year now and recently after updating to the newest versions i got an error that i have never encountered before. As stated in the ...
1
vote
0answers
45 views

How to write a script for signup on spring boot with angularjs [closed]

Our project is on spring boot with docker using angularjs for front-end. We use protractor for front-end tests. I want to write a script for easy signup by giving parameters. How can I do this and ...
8
votes
2answers
1k views

Canonical way for multi-session browser testing in Protractor

The Question: What is the canonical way to write multi browser window tests in Protractor - the tests that involve multiple sessions fired up interacting with one another? The Story: The main ...
3
votes
1answer
621 views

How to get the x, y axis location of the view itself in selenium [closed]

How to get the x, y-axis location of the view itself in selenium? I know I can get the position of a specific element. But I can't find a way to get the coordinate of the window's view itself. So I ...
0
votes
1answer
1k views

How to click on an element in pop-up?

I want to click on the highlighted English Element but unable to click on that. Actually its a pop-up wind appear when i click on the some button. But my main concern is that I'm unable to click on ...
1
vote
2answers
5k views

How to check if a file with random changing name is downloaded using protractor selenium? [closed]

This is the path of file capabilities: { 'browserName': 'chrome', 'chromeOptions': { prefs: { download: { 'prompt_for_download': ...
2
votes
1answer
3k views

“Failed: Cannot read property 'isPresent' of undefined”

it('should be able to create a task for a product as a CTA', function () { browser.sleep(6222);browser.sleep(6222);console.log("ss"); productPage.productsTab.click(); expect(productPage....
2
votes
3answers
3k views

Protractor - Find delete button in <tr> with respect to <td> in other <tr>

In the web page, we have a number of rows (with row nested to it). The below code is a snippet for one such row. <tr ng-repeat="abc" class="alpha"> <td class="one ng-binding"> Apple &...
0
votes
3answers
7k views

How To Locate Element using selenium web driver when Unique property is 'index'?

How To Locate Elements using selenium web driver when only Unique value is 'index'? Resource-id,Class and Package are not unique. Below Layout taken from Android UI Automator Resource-id = android:...
0
votes
1answer
255 views

Jasmine web services automation “getting started” doc

I have been working on nightwatchjs from past 6 months, before that I was using Selenium-WebDriver to do browser automation. I have syntactical knowledge of JS and I assume that Jasmine won't bother ...
1
vote
1answer
232 views

Usage of javascriptexecutor in automation test scripts

I am creating a script for saving a record. There is a save button and it has an ID and javascript in it. Below is my script: [FindsBy(How = How.Id, Using = "ctl00_MainContent_btnSave")] IWebElement ...
3
votes
2answers
3k views

WebdriverJS ElementNotVisibleError: element not visible

I'm new to Selenium and I think I'm just not understanding what is happening in the code and browser. I can work around my issue by replacing the driver.wait code (posted below) with a driver.sleep(...