51
votes
Why should a software QA engineer need to learn JavaScript?
Well, apart from the obvious answer like "QA engineer should learn JavaScript to be able to use TA frameworks which work with JavaScript" I would say that a QA engineer should learn JS because knowing ...
14
votes
Accepted
Why should a software QA engineer need to learn JavaScript?
To answer your questions:
1: What is the use of JavaScript for QA?
UI Testing of web pages, when the UI is written using JS-based UI front-end frameworks like Angular and friends as is the current ...
13
votes
Why should a software QA engineer need to learn JavaScript?
One of the reasons would be to write end-to-end automated tests using Protractor.
Protractor is an end-to-end test framework for Angular and AngularJS applications, where you write tests in javascript....
9
votes
Accepted
Data driven testing using csv in Protractor
Hi i found another csv module : csv-parse : https://csv.js.org/parse/ (Its used in postman)
const parse = require('csv-parse/lib/sync');
Use this module for data-driven testing instead of below-step
...
9
votes
Accepted
How to approach setting up test data for a project that has a microservice architecture?
Depending on how those microservices interact with each other there may be several possibilities. The whole microservices concept was created to allow microservices to be developed/tested/deployed ...
8
votes
Accepted
Speeding up end-to-end tests
I discovered the following points while speeding up my protractor(selenium) tests:
Run tests in a headless browser(from version 59, chrome can be run
headless natively)
Run tests as direct ...
7
votes
Accepted
Playwright: Printing Console Logs each time when one of the test fails
Browser console message/errors can be listened like below at runtime:
const playwright = require("playwright");
(async () => {
const browser = await playwright.chromium.launch();
...
6
votes
Accepted
Detecting complicated CSS selectors
What parameters would you consider to determine if a CSS selector is resistant to a change? What makes a reliable CSS locator? Some factors I would consider:
To start with, the basics are:
...
6
votes
Xpath for sign out button
There are much better ways to locate the element aside from using XPath, don't focus on XPath too much - this is, generally speaking, the slowest and the least readable way to locate elements.
I ...
6
votes
Why should a software QA engineer need to learn JavaScript?
I think the basic question should be "Why a software QA engineer should learn programming".
Which programming language to learn is not important, it can always change. As a QA Engineer, you can work ...
6
votes
Accepted
How to verify response body as a test in postman
As @Mache says, you search for each value.
var jsonData = pm.response.json();
pm.test("Verify Json values", function () {
pm.expect(jsonData.data.id).is.to.equal(2);
pm.expect(jsonData....
6
votes
Accepted
Can developers easily add IDs to a React app?
No, that's not true at all; you can definitely add your own id attributes to elements rendered in React components. id is listed as a supported DOM attribute in the docs.
Yes, in cases where ...
5
votes
Accepted
Why should we use javascript for UI test automation?
Yes - For Unit Testing Javascript
I've been working with this concept over the last few years and I've come to the following, multi-tier approach:
Unit testing on the backend. For example with Ruby ...
5
votes
Accepted
Switching from JavaScript to TypeScript for Protractor e2e tests
The nice thing of TypeScript you do not have to migrate at once. TypeScript is a superset and can parse plain JavaScript as well. You can keep your old code and start using TypeScript for new code or ...
5
votes
Accepted
End-to-end tests are running for 5 hours
A few things to consider come to mind:
Only run in Chrome
Controversial huh? Let me explain more fully though. My question for multi-browser and indeed multi-device (responsive web sites) testing ...
5
votes
Why should a software QA engineer need to learn JavaScript?
With the popularity of JS Frameworks like Angular, React, Nodejs, there has been a surge in the testing frameworks using JS- be it an E2E framework like Protractor, Nightwatch, Cypress or API testing ...
4
votes
Accepted
Selenium: how to wait for javascript fadeout (visibility and clickable don't work)
Instead of waiting for your element, try to put wait for the invisibility of previous element. Like try the below code:
WebDriverWait wait = new WebDriverWait(driver, 100);
boolean waitUntil = ...
4
votes
Correct CSS selector for selenium
If your edit class is unique on the page, then you can do .edit If you need to be a bit more specific, you could do more along the lines of .active.editing input.edit
The point is, theres no "right" ...
4
votes
Accepted
Usage of javascriptexecutor in automation test scripts
Your test is supposed to reproduce the user behavior as close as possible, but you are calling the method attached to the button rather than clicking the button. So it kind of defeats the purpose of ...
4
votes
Why should we use javascript for UI test automation?
We have recently started with writing WebDriver tests in JavaScript and I have to agree that the asynchronous execution is adding an unneeded complexity.
Pro's:
Same test-runner as other (front-end) ...
4
votes
Why should we use javascript for UI test automation?
As you mention, the asynchronous chaining API seen in "selenium-webdriver" NPM package and also in nightwatch, protractor, testcafe, cypress, intern and wd.js etc can be quite hard to understand.
...
4
votes
Accepted
How to find Scroll bar xpath?
You can't. Scrollbars are part of the browser and not the HTML document. This means you cannot control them unless it isn't a real scrollbar (one that is created with HTML+JavaScript).
ScrollBars are ...
4
votes
Rerun failed (flaky) tests with Jest
We recently switched from mocha to jest and in the process came across a flake which appears to due to a bug in react. Given the difficulty we had in investigating this issue and that it should be ...
4
votes
How to profile end-to-end tests to find the slow ones?
From your test framework or from logs, first identify the slow ones.
Debug each test (single stepping) to determine which area is slowest. Identify if it's client or host related, backend, frontend,...
4
votes
Switching from JavaScript to TypeScript for Protractor e2e tests
NO.
I would not suggest doing so until you have a specific objective to be met by doing it.
In my opinion, its only worth the effort if you are working on large development project but for ...
4
votes
Does WebDriverJS/WebDriverIO promises make javascript the language of choice for Selenium?
TL;DR: convenience of programmers not the only deciding factor when selecting the implementation language.
Promises are necessary when programming page events and response to asynchronous AJAX calls.
...
4
votes
driver.manage(...).timeouts is not a function
"chromedriver": "^2.36.0",
"selenium-webdriver": "^4.0.0-alpha.1",
here example of create driver function:
import webdriver from 'selenium-webdriver'
import chrome from 'selenium-webdriver/chrome'
...
4
votes
Protractor - How to use async/await
Where to use async-await in Protractor scripts?
Async/await statements are only required in places where promise resolution is occurring before moving to the next statement so yes, it is only ...
4
votes
Which is faster: creating a method to reference a web element by label text, or directly referencing the element via a UI?
I would expect directly referencing it by a few milliseconds.
However premature optimization ('efficiency, performance') without a clear issue to address will 'fix' the wrong problem and lead to less ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
javascript × 318selenium-webdriver × 199
automated-testing × 111
protractor × 74
java × 48
browser-automation × 19
jasmine × 17
cypress × 13
selenium2 × 12
cucumber × 12
nodejs × 11
postman × 10
mocha × 10
angular × 9
appium × 8
page-objects × 8
api-testing × 7
webdriver.io × 7
playwright × 7
python × 6
unit-tests × 6
selenium-ide × 6
end-to-end × 6
typescript × 6
test-automation-framework × 5