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
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
94 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
317 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
208 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
19k 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
10k 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
48 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
205 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
51 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
13k 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
19k 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
891 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
12k 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
145 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
567 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
556 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
948 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
498 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
4k 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
2k 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
6k 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
233 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
218 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(...
0
votes
4answers
12k views

How to right click and select option in WebdriverJS?

I am using Selenium WebdriverJS (NOT Java selenium and NOT Webdriver.io!), which has horrible documentation for beginners. I need to right click an element and move down to "save as", then .sendKeys() ...
2
votes
7answers
9k views

Selenium: how to wait for javascript fadeout (visibility and clickable don't work)

So, in the AUT there's a <div> loading screen covering the entire page, which then fades out and gets replaced in the DOM by the <body>. I'm using ExpectedConditions for visibility and ...
1
vote
1answer
801 views

Cucumber-JS how to modify the information in a failed steps 'Message'

we are using cucumber JS with sync-reqest to do headless end to end testing of our web app. Each scenario has its own x-correlation-id which is set as one of each call's headers - which makes it ...
1
vote
1answer
605 views

Sikuli analog for selenium javascript

I use seleniumjs to automate my tests Is there a tool which can find an element on a page by its image? Or just assert that an image is present somewhere on a page I know Sikuli in Java can do such ...
5
votes
2answers
938 views

Using SuperTest/Protractor on unsecure HTTPS

I am trying to run automated API tests on localhost with an invalid cert. Is there a chromeOption equivalent to "Proceed Anyway" that I can pass to the tests so they can get a response from the url? ...
4
votes
3answers
2k views

Tools for automated testing of web site in JavaFX WebView

Automated testing of web site in JavaFX WebView I have a Web Site, for which I have to write automated tests. The WebSite is built with the following technologies: HTML, CSS, Js, AngularJS. The major ...
2
votes
1answer
785 views

How do I check if a tooltip appears or not?

How do I check if the tooltip appears or not in selenium? When mouseovering the element, I can see the tooltip appear. How do I verify that the tooltip appears? HTML of the Icon: <td class=" text-...
2
votes
1answer
1k views

Protractor Dynamic numer of test runs depened on count() result

In my Protractor Test suite I have some problem with parametrizing number of tests . it('Login and Count', function () { PageObject.login(); var number = element.all(by.something()).count()....
1
vote
3answers
2k views

Nesting callbacks with protractor

I'm using test framework protractor to test an angularjs app. I've been doing this for sometime now and one of the question that I've not been able to answer is : Suppose I want to modify a the value ...
3
votes
3answers
4k views

Can we generate unique distinct users for parallel tests in selenium?

Can we generate unique distinct users for parallel tests in selenium WebDriver and java? Suppose, in google create an account action I want to pass firstname, Lastname, Username & Password for ...
1
vote
1answer
528 views

Anyone find value migrating to NightWatch from Python Selenium API?

My dilemma, I have tons of tests and experience on the Python API to Selenium and webdriver. But, my dev team is big time javascript fans who think everything should be built under node/js. I want to ...
3
votes
2answers
6k views

Switching windows with non angular pages using Webdriver JS

I have a non angular page that I open and then click a link, which changes pages and I fill out a form with some information and then click a button. Upon clicking that button another browser window ...
2
votes
2answers
3k views

How to click on the hidden values in selenium webdriver using java?

I am trying to click on one of the hidden values but it is neither fetching nor it clicking on that value. I am trying for Indian railways berth availability wherein I want the source station value e....
1
vote
4answers
5k views

How can I execute selected test cases from list of testcases in TestNG at runtime?

I want to create a page with the details of test cases (say a HTML Page with some content). Say the testcases will be listed there. When i want to run the test cases then I will select them and click ...