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
1
vote
1answer
33 views

Selenium WebDriver - Unable to identify if radio option is selected or not - contains pseudo elements

I am having hard time with identifying if radio option No is selected or not using Selenium Java. Below is the screenshot of the radio options on the web page. A workable solution is much appreciated. ...
0
votes
2answers
445 views

Getting error when I run my test using mocha

I have written a code where it will launch the app, click on the login button, enter username and password and click on sign in. When I run this using node 'filename' it is running fine with no issue....
-1
votes
2answers
30 views

How do I verify a value from a CSV file using Postman test [duplicate]

I'm using Postman to push data from a CSV in my Google cloud bucket to an app. I need to write a test to verify that one of the values in the CSV is all in uppercase.
1
vote
1answer
26 views

Hooks not getting executed in protractor cucumber

I new to protractor, and trying to implement hooks. But the hooks are not getting executed. Following is my code: Hook.js: const { Before } = require('cucumber'); const {AfterAll} = require('...
2
votes
1answer
3k views

When I tried to install opencv4nodejs I am getting an error

I am new to appium using javascript and to install appium I am following this link Setting up appium with javascript So when I installed appium-doctor and ran it I got an error. info AppiumDoctor ...
-1
votes
0answers
18 views

Chai assertion failing in protractor cucumber

I am creating a project in protractor using cucumber and using Chai assertions. The scenario is to create a user, and then to go a page where the user is added to a table. The page has a search bar ...
0
votes
2answers
2k views

How to reliably click bootstrap dropdown with no button element?

I am using Selenium to try and select an element in a bootstrap dropdown menu, but there is no button element present. The website uses all JavaScript to enable the dropdown. The HTML code for the ...
0
votes
0answers
14 views

How to add the number of times a test needs to be run in webdriverio and javascript

I would like to repeat a test run multiple times. So I would like to add the count to the command we are passing to run the test. I tried adding the option to grunt file but is not working Command ...
0
votes
2answers
496 views

Transition from selenium to protractor - worth it?

Over the last few weeks, We have been experimenting with a protractor+typescript+cucumber framework for our new Angular 6 application. The main reason we thought our present Selenium+Cucumber+java ...
2
votes
3answers
5k views

Scrolling to Bottom of the Text Area using Protractor

I have a text field that I need to scroll to the bottom of in order for the Next button to be activated to click. This project is using Angular 6 my tests are end to end test running on the protractor/...
2
votes
3answers
46 views

Is there a way to capture Jasmine assertions?

Is there a way to capture expect failures in Jasmine? This doesn't work, the exception is not captured. try { expect(1).toBe(3) } catch (e) { } I am looking for something like this TestNG ...
0
votes
1answer
84 views

Able to find xpath, but trying to click button throws exception

I tried to click on an element using the code below but it is throwing Exception: No Such Element Selections WebElement clear=driver.findElement(By.xpath(PageUtility.OPEN_LOCATION_POPUP_XPATH)); ...
1
vote
2answers
107 views

What are some typical javascript, HTML and AJAX issues that I should write test cases for?

HTML rendering, Javascript and AJAX plays an important role in the development of modern web applications. How significant is JavaScript when designing test cases for a website that uses it? What ...
0
votes
1answer
121 views

Nightwatch JS - How to run multiple individual test cases?

Are there any other way to run test cases individually other than using --testcase flag ? also are there any to run 2 single test case from 2 different test suites? For example: Test Suite 1 Test ...
0
votes
1answer
997 views

When I run my appium script I am getting error “TypeError [ERR_INVALID_ARG_TYPE]”which I am not able to understand

I wrote a script to automate my app using appium with java-script(nodejs), but when I run it I am getting error. This is the code which I have written. var webdriverio = require('webdriverio'); var ...
1
vote
2answers
1k views

Nightwatch: Timed out while waiting for element to be present. - expected “found” but got “not found”

Using Nighwatch's POM below is a page function to click a button, page needs to be refreshed and validate if element present. using this.api.refresh() to refresh the page. But waitForElementPresent ...
10
votes
2answers
347 views

Data driven testing using csv in Protractor

I am trying to run data-driven testing using csv file in protractor : I have created a read csv promise module: let readSync = async function (path1) { console.log(path1) const csv = require('csv-...
0
votes
1answer
53 views

Fetch paid Amount value from iframe

if(ScenarioName.equals("MoveinwithVantivCard")) { driver.findElement(By.id("btnsave")).click(); // driver.switchTo().frame("paymentIFrame"); driver.switchTo().frame(driver.findElement(By....
1
vote
2answers
14k views

How to verify response body as a test in postman

I want to verify the response data as a test using Postman. For example, given the response below: { "data": { "id": 2, "first_name": "Janet", "last_name": "Weaver", "avatar":"...
1
vote
1answer
185 views

Passing global variables to Newman (Postman) from Jenkins

I have a Postman Collection with Global Variables that I am running via Jenkins (successfully), but I want to expose choices for the variables as Choice Parameters within Jenkins. I asked an initial ...
2
votes
1answer
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
4answers
3k views

How to take the screenshot of a window based GUI application?

I am automating tests of a GUI application similar to calculator. I am using Java and AutoIt for implementing the test cases. I need to take screenshot on failure. I have tried taking screenshot ...
1
vote
2answers
4k views

How to upload an image selenium webdriver with javascript?

driver.wait(until.elementLocated(webdriver.By.css('div.border-right:nth-child(2)')), 1000) .then((element) => { element.click(); }); I am using java-script for my test cases. I had an issue to ...
0
votes
1answer
58 views

Is it possible to use Microsoft UIA to automate sites designed in Angular?

I am trying to automate UI for a site designed in Angular and when I inspect the browser (Chrome) with UISpy.exe, I find that certain controls do not exist in the tree at all, even though I can see ...
1
vote
2answers
503 views

How to bring elements to view automatically in Protractor or selenium

I have a webpage to be tested which has a button at the footer of the page. When i click it, there should be an error message shown near to it. I was successful in automating this scenario but the ...
0
votes
3answers
170 views

Mouse hover action to browser window close button

I have a test scenario where the web application checks for the user's leave intent i.e., mouse hovering from the page to the browser close and then a frame gets triggered. Is there any way to do it? ...
2
votes
1answer
389 views

Writing tests for a complex Polymer SPA (single page application)

I have a pretty complex Polymer Single Page Application. It has things like Facebook login, online ordering via credit card, as well as user profiles, image uploads, services offered, real-time chat, ...
35
votes
10answers
15k views

Why should a software QA engineer need to learn JavaScript?

I've seen in lot of job advertisements, companies asking for JavaScript knowledge for QA. So my questions are: What is the use of JavaScript for QA? If JavaScript is used for testing, what kind of ...
1
vote
1answer
64 views

Exposing Postman Global variables as Jenkins Choice Parameters

I have a postman collection which I have managed to run from Jenkins using Newman. I have a groovy pipeline in which I install the dependencies included in my package.json (Newman in this case). ...
3
votes
2answers
242 views

Best practice to TDD a unit of work in frontend JavaScript

Context Right now, I'm working on an overhaul of an edit page for a menu, which is quite involved in and of itself. I have identified the issue: there is literally no structure in place for when a ...
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 ...
0
votes
0answers
5 views

Importing files and images in blueJ on a mac

I do not know how to get my file or image in bluej on a mac. I know all the correct coding, but it does not work. My teacher told me she only knows how to do it on a windows, so I am pretty much ...
1
vote
1answer
72 views

Typescript function not waiting for the waitForExist() and printing the next line

I'm using webdriverIO with typescript and jest to automate react application. I have a simple test to check how long it takes for a particular element to display on the screen. There's a process ...
1
vote
0answers
93 views

waitForCondition class change

I'm having an issue with a menu which needs a double click to activate the main option. The first click adds 'focus open' classes to get the UI to open the hover over menu in mobile, the second ...
1
vote
0answers
516 views

Page Object Design: Is there a Javascript equivalent to Ruby gem “site_prism”

I'd like to know if there is a framework in Javascript (NodeJS) for Protractor which supports a clean way to define the Page Object Elements on a Page Object as site_prism does. I've already checked ...
2
votes
0answers
953 views

How to expand upon the error from a Jasmine expect failure?

I'm using Jasmine, FrisbyJS, and Jest to create API tests for my team's product. I want to be able to handle when an expect (which I'm pretty sure Frisby is just using the underlying Jasmine expect) ...
2
votes
0answers
461 views

Can't swipe open Ionic ion-menu with Protractor

We have this Ionic3 ion-menu (hidden left-side slide-out menu) which we have to swipe it open to the right so that it shows. On Chrome, with the click of the mouse, it can be easily done. But can't ...
1
vote
2answers
167 views

Postman API test structure

Recently I started writing tests for our API. However, I have faced some issues which I think it is critical to think at the start. How should I structure my tests in terms of setup and cleanup phase(...
2
votes
2answers
629 views

How to query the Canvas using Selenium with JavaScript Executor or Protractor?

I like to know if it's possible to automate this 'graph' which is created on the canvas, if yes, how to automate it. I have to interact with all the elements on the 'graph or a map like thing' by ...
-1
votes
1answer
16 views

What are some simple eslint defaults that can help improve app code and test code quality?

I use mocha/chai and my .eslint file is in YAML. What eslint settings could I apply to most projects, i.e. use as a template ?
6
votes
1answer
561 views

How to approach setting up test data for a project that has a microservice architecture?

I have to integrate API test-automation on a project that has a microservice architecture. Each back-end service has a different repository and is deployed separately. I haven't had the opportunity of ...
1
vote
1answer
546 views

If else loop is not working/ element exists: cypress automation

I am new to cypress. I read some of the other if-else cypress related questions and yet fail to understand whats wrong with my code. What I am trying to accomplish: if "There are no results" found on ...
0
votes
2answers
30 views

Headless mode buttons are hidden - I think the side drawer is closed?

Using webdriver.io and chrome for e2e test. In the browser GUI the test runs fine. But with headless chrome it complains about not finding buttons in the left side nav bar. I think in headless the ...
0
votes
2answers
157 views

How to getText concatenating 2 strings in Protractor

I have 2 variables that get the texts: locationDisplayed and bindisplayed. I want the 3rd variable: expectedDescription concats the text of the first 2 vars. Here is the code: let locationDisplayed = ...
1
vote
1answer
26 views

How could I improve my page objects for this iterator assertion?

I am writing a e2e test for my front end web app with webdriver.io and node/javascript. Specifically, I want to improve my page objects. I have a dropdown that has two items(two rows of items) in a ...
1
vote
1answer
450 views

How to structure data driven Protractor/JS tests in page object model?

I am using protractor/js for automating end to end tests for our website. We have a test data set that we have saved in different JS files and we use this data while executing test cases. We are ...
2
votes
0answers
60 views

How to integrate and configure Polly.js with WebdriverIO?

So, I have been using webdriverIO. I noticed recently, there was support for puppeteer instead of using the typical selenium webdriver. I have configured my e2e tests to use puppeteer now instead ...
2
votes
1answer
110 views

Cypress + mochawesome-report undefined in consol

I have simple test to test mochawesome-report when I run it in terminal I have "undefined" multiple times during tests. How to remove it? undefined Sample test √ Passed 1) Failing ...
2
votes
2answers
163 views

Best strategy to test automatically a web application

I have an application that consist of a web server in Java EE (EJBs and JAX-RS RESTful services) and a client module in Angular that runs in a browser. The components that I can unit test ...

1
2 3 4 5 6