Skip to main content
Share Your Experience: Take the 2024 Developer Survey

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
0 votes
0 answers
2 views

Do you disable JavaScript as part of your testing? If so, how do you know whether something is buggy?

I sometimes disable JavaScript to see how a website behaves without it. I'm often surprised how much the content display relies on it. But I'm unsure whether it's a bug. I read that almost everybody ...
Y-B Cause's user avatar
  • 179
0 votes
1 answer
33 views

How to repeat the same test with Selenium Webdriver without opening a new browser instance each time?

I am using Selenium Webdriver on Node.js with Cucumber.js. I want to run the same test on multiple pages. In this case just checking for 404s in my footer. My Cucumber .feature file looks like: ...
MeltingDog's user avatar
0 votes
0 answers
5 views

Getting javascript is disabled after launching the application

Whenever I launch our application, in the Welcome.do page I am getting the javascript disabled message however when I check the about:config, I can see that the configuration is set to javascript....
Nelza's user avatar
  • 1
0 votes
0 answers
65 views

How do I properly dismiss an alert in JavaScript with Selenium Webdriver?

I am using Cucumber.js and Selenium Webdriver on Node.js. I am testing a page that has an alert pop-up when the page loads - it asks for permission to use the user's location which I have disabled in ...
MeltingDog's user avatar
0 votes
1 answer
128 views

What is the best way to set up multiple tests on one webpage with Selenium Webdriver and Cucumber JS?

I am new to automated testing, Selenium and Cucumber.JS and am trying to set it up in Node.JS to run several tests on my website. I have gotten single scenarios/test working fine, but I am a bit ...
MeltingDog's user avatar
-1 votes
1 answer
547 views

getting this error AssertionError: expected undefined to deeply equal 'open_group'

const jsonData = pm.response.json(); pm.test("Status code is 200", function () { pm.response.to.have.status(200); }) //each month on the payment day, next_cycle is updated pm.test("...
user57151's user avatar
0 votes
0 answers
554 views

How to send a multipart/form-data request in cypress which having xml file

I'm having a POST request which have multipart/form-data content and data in xml like below userlist: " <user id="[email protected]" password="Password1" path="sysadm/...
Jagannatha Mv's user avatar
0 votes
1 answer
23 views

Visual representation of an element I am clicking in VS Code

I think remember reading this somewhere but cannot remember if it is true or not. Is there a VS Code extension that will let you visually see on the web page (or in VS Code) where exactly the mouse....
user5821872's user avatar
0 votes
0 answers
54 views

Auto suggestions missing for built in locators like goto, click, fill in Playwright Javascript

I am doing playwright java script automation using POM cucumber BDD framework. I initiated page object in Hooks file. If I want to access that page object in another methods in the same file it is not ...
Meera Yogesh's user avatar
0 votes
1 answer
578 views

How to reset app between tests in WDIO?

I'm currently trying to get WebDriverIO working with Appium and Mocha (BDD) towards an Android device. Previously when I've worked with Mocha the behavior has been that testcases are isolated from ...
Rejected-Potato-27's user avatar
-1 votes
1 answer
2k views

Cypress API testing : How to login and then use the auth token in another test?

How can I access the token generated from 1st it block to 2nd it block. here is the code: 1st it block it('Login using new user', () => { cy.api({ method: "POST", ...
Jimmy's user avatar
  • 111
1 vote
0 answers
500 views

How can we validate the response body using Tests in postman

Request Body { "StudentInfo":{ "Student":[ { "StudentId":"001" } } } Response Body { "Studentinfo":{ "Student":[ { "StudentId":&...
user55898's user avatar
0 votes
1 answer
115 views

Will Selenium Webdriver become less popular in coming years? [closed]

Lot of Automation engineers have shifted to new Web automation tools like Cypress, WebDriverIO, Pupeeter, Playwritght, Katalon Studio, AI tools like Testium, Functionize etc and i am still working on ...
jimmy234's user avatar
0 votes
1 answer
68 views

Scrolling using the same code is working 7/10 times

With same code I have tried scrolling, firstly I scrolled to bottom then top and then to element so that element can get loaded properly even though sometimes testcases are failing due to scrolling ...
Ishmeet Kaur's user avatar
1 vote
2 answers
1k views

How to get body data in logs for each request in K6

I would like to know: how can I get the body data in response to each request in K6? I tried using console.log(response.body), but it did not provide a solution for it. Either it gives a response in ...
saadali's user avatar
  • 11
-2 votes
1 answer
4k views

Getting javascript error: element is not defined

I am trying to verify carousel has auto flash and manual selection options. For manual option I checked the slick dots are clickable. For auto flash option I am checking the style animate-repeate is ...
Darshani Kaushalya's user avatar
1 vote
1 answer
5k views

Verify read-only fields using cypress

I have a few text fields which when I login as a specific user (rights of a read only) , all the text fields are not allowed to be edited. I am trying to automate this page in Cypress. I tried using : ...
Sriharsha Karanth's user avatar
1 vote
1 answer
886 views

Can not sendKey to hidden element

I'm practicing to interact with element (nopCommerce domain). But encountered some problems, when trying to perform sendKey to an invisible element. This is an input field of product tags, which ...
Jimma's user avatar
  • 23
2 votes
1 answer
277 views

Scrollbar value returns false even though it is present

I have a pop up which enables a scroll bar depending on the element count it contains. Right now there are more than two elements and scroll bar is present. Below is my html view of the pop up. <...
Darshani Kaushalya's user avatar
1 vote
0 answers
612 views

Unable to scroll into view of an element in iOS with Appium & Webdriverio

i'm trying to scroll into an element but the the current code scrolls all the way to the bottom of the page, i have inserted the element name within the code but it doesn't seem to work. const ...
Sources's user avatar
  • 11
0 votes
1 answer
137 views

Element is not clicked even after explicit wait

I am trying to verify default selected value of a dropdown. <div class="p-3 p-md-4 mt-4 mt-md-4 card"><div class="row"><div class="d-flex align-items-center col-...
Darshani Kaushalya's user avatar
2 votes
1 answer
291 views

Verifying scrollbar is present script fails

I'm trying to check whether a scrollbar is present when there are more than 2 elements in a pop up. Here is the HTML code for the div which enables the scroll bar if when there are more than 2 ...
Darshani Kaushalya's user avatar
0 votes
2 answers
583 views

Button click was not performed even though element was found

I'm trying to click below button. <button class="MuiButtonBase-root MuiButton-root jss47 jss58 MuiButton-contained jss48 jss59 MuiButton-containedPrimary MuiButton-disableElevation" ...
Darshani Kaushalya's user avatar
-1 votes
1 answer
140 views

Looking for Javascript coding challenge Websites. Can you guys help?

I really need to improve my JS coding (currently learning ES6) as it would be great for my automation Testing. I would like to take a daily coding challenge (min 30 days) but I'm having difficulty ...
fypnlp's user avatar
  • 437
0 votes
1 answer
85 views

Different boolean results for same scenario - selenium java

I'm trying to verify whether profile image is present after uploading an image. Image uploads successfully. I have try to verify image with two different ways. profileImage= driver.findElement(By....
Darshani Kaushalya's user avatar
0 votes
1 answer
3k views

Cypress: cy.type() requires a valid time with the format with the format HH:mm, HH:mm:ss or HH:mm:ss.SSS

I am automating using cypress, there is a time input in the application. The html of it as follows: <label>Time</label> <input data-testid="time" type="time" name=&...
RenukaA's user avatar
  • 139
1 vote
1 answer
2k views

Testing Stripe payment integration using Cypress

We've recently implemented Stripe for customers to checkout. However, using Cypress to automate our regression tests was incredibly painful as the fields are inside an iframe (and, for some reason, ...
dvniel's user avatar
  • 2,538
0 votes
0 answers
317 views

FIle Upload in WebdriverIO with AutoIT

I am trying to upload a file in a file upload filed in WebdriverIO with AutoIT. I am unable to execute the .exe file which will select the file from File Explorer in Windows. Can anyone tell me what ...
Md.Maruf Rahman's user avatar
1 vote
1 answer
489 views

How can I find all values between strong brackets from a javascript website using Selenium?

I'm trying to scrape a javascript website. The website contains a list of products and I need to find out a specific product through this list. All product names are between strong brackets from an ...
DBL's user avatar
  • 11
0 votes
1 answer
749 views

Unable to locate pseudo element using javascript executor in Selenium JAVA

I am currently having issues with locating an pseudo element for a web page. I have checked other articles to use javascript and tried but it still isnt getting it. Below is a screenshot of what the ...
bugsy5923's user avatar
0 votes
0 answers
126 views

MatcherAssert fails on popup modal

I have a script that goes to a page, clicks a button and then uses a MatcherAssert to check I am getting the right messaging on a gating modal. Here's the script: package com.lbr.testcases.lexology....
Samantha Zoe's user avatar
3 votes
1 answer
10k views

Playwright: Working with Bootstrap modal dialogs/popups

So I have been facing some issue with some of my tests which require a user to Confirm or Cancel a Bootstrap modal dialogs/popups windows. It seems that each time when I try to interact with a Confirm ...
Automation_Padawan's user avatar
2 votes
2 answers
14k views

Playwright: Creating and interacting with a list of elements on the page

This might be a simple question, however I would like to know if there is a simple way of declaring a list of elements which later on you will be working on for example looping through it and looking ...
Automation_Padawan's user avatar
4 votes
1 answer
13k views

Playwright: Printing Console Logs each time when one of the test fails

I am working with Playwright, Mocha and Chai for my automation project and I was wondering if there is a way for capturing all console logs that appear during a failed automation test execution. ...
Automation_Padawan's user avatar
2 votes
4 answers
3k views

Playwright: Implementing Page Object Patter into Framework

Recently I have been asking questions regarding Playwright and so far the community has been very helpful. I hope that my question and answers provided will be in use for people who are just starting ...
Automation_Padawan's user avatar
1 vote
1 answer
1k views

Playwright: Executing different test suites depending on script parameter

I have switched to Playwright recently and I would like to ask you for some feedback on my current issue which I am facing at the moment. I have a simple framework set up for one of our company ...
Automation_Padawan's user avatar
3 votes
1 answer
8k views

Playwright: Storing an element selector in variable

This might be a trivial question/answer, however I would like to know if there is a way that I could store an element locator in a variable and then reuse it same as it while working with Selenium and ...
Automation_Padawan's user avatar
-2 votes
1 answer
2k views

Return multiple variables from custom command in Cypress

What I am trying to do: I have a custom command, inside which i am declaring few variables(boolean). I am setting the values for the variables as per my code. I wanna use the variables to assert in ...
MeBhiAutomationTester's user avatar
1 vote
3 answers
768 views

(Google Chrome Extension) I want to click a link on a page but they all have similar hrefs

I want to click a link on a page but they all have similar hrefs This works for clicking the first link Code: await executeScript("document.querySelector('a[href*="/p/"]').click()")...
QuelKitz's user avatar
0 votes
3 answers
2k views

TypeError: driver.actions(...).move is not a function

I am writing a selenium test in Javascript, where I want to move/hover cursor over a particular element. I tried bunch of things, but nothing seems to work - 1. driver.findElement(selector) ....
Jayarani garg's user avatar
0 votes
1 answer
375 views

How to check in the page if the name exists and then increment a unique name

I have a scenario where I need to add new username everytime is run the script. For instance, if the last time I had added a name as test1, then next time when I add another name I should not add ...
sandy's user avatar
  • 23
1 vote
3 answers
2k views

Breaking a loop after resolving a promise

I am writing a program to check the health endpoint of one of our APIs. So, before starting execution, I try to hit the health endpoint 5 times. If I get the desired response code during the 5 ...
Aalok's user avatar
  • 1,732
1 vote
1 answer
28 views

Should cross-browser and cross-platform be performed for testing network calls from a website?

My team is implementing Adobe Analytics on a web site. We have three layers where it should be tested. Adobe Data Layer. The required variables and their values are added to an object handled by a ...
Seeker001's user avatar
  • 572
1 vote
1 answer
2k views

File download verification with selenium and java

So I read all the other stackoverflow topics about this, none of the solutions worked for me so lets see if someone can help me. I need to verify a download (csv) from an export button in chrome(...
thomarkey's user avatar
2 votes
2 answers
6k views

How to get cookie value in cypress from a cy.request response?

I am using the following before my test to try and get a cookie value from the request cy.request({ method:'GET', url:`https://test:[email protected]/meat/meat-...
Mark Wilson's user avatar
0 votes
1 answer
385 views

After applying the color to the button element, the color property of an element returns null

I am trying to get the color property of the button element using Javascript inside Selenium, before and after clicking the button. HTML code: <html> <head> <meta charset=&...
Sandesh Sawant's user avatar
1 vote
1 answer
1k views

WebDriverIO executing too fast

I think this is weird, as I have been researching and most of the questions related to WebDriver execution time are about it running slow. However, the problem is that the page which I'm testing is ...
Alanarg's user avatar
  • 11
0 votes
1 answer
164 views

Assert that options (text) in drop down are unique

I’m creating test in cypress using typescript, I’m not sure how to assert that all options in drop down are unique - I found bug where is situation that values are duplicated multiple times - it’s a ...
ciupakabrans's user avatar
1 vote
1 answer
3k views

How to re-run jest failed test suite [closed]

I want to re-run the whole test suite when any test has status failed. I only found how to re-run the test case but I want to re-run the whole test suite.
Aashish Sharma's user avatar
0 votes
1 answer
3k views

Unable to fill the card details for Payments using Selenium at the merchant's checkout page

I have just started learning Selenium web automation tool and wanted to auto-fill the card details on the merchant's Payment Page but unable to do so using Selenium. Below are the things which I tried....
Nikhil_Coder's user avatar

1
2 3 4 5
7