Questions tagged [javascript]

JavaScript is a dialect of the standardized ECMAScript programming language, primarily used for scripting web-pages.

46 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4 votes
1 answer
233 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 ...
adbarads's user avatar
  • 141
3 votes
0 answers
607 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 anyone please help ...
vedant's user avatar
  • 31
3 votes
0 answers
208 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 a separate browser, i.e open new browser run test run test close browser and so on but I'm unable to figure ...
CodeBlooded's user avatar
2 votes
4 answers
6k 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 ...
PDHide's user avatar
  • 11.1k
2 votes
0 answers
524 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 ...
Roberto de Toledo's user avatar
2 votes
0 answers
1k 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) ...
S.Huston's user avatar
  • 167
2 votes
1 answer
5k views

Using Protractor Cucumber JS: When running a test, the test passes when it shouldn't

I'm writing a test where I should log in. It passed given the proper inputs but when I change its password/username to garbage, it still passes. I'm new to this and I really think I missed something ...
Marianne's user avatar
1 vote
0 answers
572 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
1 vote
0 answers
372 views

How to automate Handsontable using Selenium WebDriver (Java)

I want to automate the Handontable using Selenium WebDriver using Java. Basically, I want to enter data in the handontable using selenium(Java). Is there any way available to enter data in the table. ...
Updesh Kumar's user avatar
1 vote
3 answers
1k 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? ...
Adithya Ram's user avatar
1 vote
0 answers
78 views

Open a clickable link on a web page and take the screenshot at the same time

I'm new to Chrome headless and I have a problem. I want to randomly select two links from a web page on the page being viewed and open them at the same time. Indeed my goal is to be able to have the ...
Lionel Noutegne's user avatar
1 vote
2 answers
3k 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 ...
Vignesh Sankar's user avatar
1 vote
0 answers
30 views

How to print the webservice(jqurey) hit on the console for search functionality

Open a website, press F12 go to network option and enable preserve log now type the work you want to search eg:dogs we can see the service "http://search.test.com/search........." here i want the ...
Ramya's user avatar
  • 33
1 vote
0 answers
61 views

Code Coverage using Scala Automation Testing for JS web application

I'm looking if there's an existing application or tool that will run code coverage based on a scala implemented automation suite running against a Javascript web application. Our automation framework ...
edg's user avatar
  • 11
1 vote
3 answers
7k 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 ...
Priyadharshini Hariharan's user avatar
1 vote
0 answers
555 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 ...
Jagannatha Mv's user avatar
1 vote
0 answers
668 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 ...
CodeBlooded's user avatar
1 vote
0 answers
105 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 ...
lindsaymacvean's user avatar
1 vote
0 answers
238 views

search string text in search grid is not working using send keys

I am passing sendKeys( ) through search grid to search a particular string.I am able to click that search text but its not clicking the search string ,Below is the html for that search text: <...
Ranjan Gupta's user avatar
1 vote
0 answers
537 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 ...
Leo Gallucci'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
46 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
0 answers
444 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
19 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
48 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
481 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
0 votes
1 answer
70 views

What aspects of javascript are relevant for Selenium Automation (with Java bindings)?

I use Java and Selenium for my automation framework. However, sometimes, as per need, I have to use JavaScriptExectutor in my script. But I have never studied JS and no nothing about it. If someone ...
jimmy234's user avatar
0 votes
2 answers
60 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
0 votes
0 answers
1k views

How to display the number of pages in Pagination WebTable using Selenium Webdriver

I wan to display the number of pages in count in Pagination WebTable using FOR Loop, please find the code of FOR Loop condition. But not able to display the total number count of pages. When clicking ...
user3172464's user avatar
0 votes
0 answers
303 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
0 votes
1 answer
671 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
0 votes
0 answers
652 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 ...
RRR's user avatar
  • 111
0 votes
0 answers
45 views

Driver does not recognize pop-up's - can not switch

In years it is the first time I saw something like this, when I do a: config.getWebDriver().getWindowHandles().size() The result is always 1, but in fact, there is a main window opened and after a ...
Leonardo Leonardo's user avatar
0 votes
1 answer
521 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)); ...
jay's user avatar
  • 13
0 votes
0 answers
118 views

How to select item from dropdown element in Javascript

This is the statement i am using in Newrelic synthetic monitor written in javascript return $browser.waitForAndFindElement(By.name("//*[@class=\`attribute-field-container\`]/select//option[5]"), ...
Salman's user avatar
  • 103
0 votes
1 answer
1k 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 ...
manoj's user avatar
  • 117
0 votes
2 answers
690 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....
manoj's user avatar
  • 117
0 votes
1 answer
88 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....
John snow's user avatar
0 votes
1 answer
90 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 ...
Satish Rao's user avatar
0 votes
2 answers
3k 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 ...
kkrenzke's user avatar
-1 votes
1 answer
163 views

Populate a field with value from another field based on xpaths using javascript

I'm trying to read a value from a dynamic text field (value is updated on each visit) based on the xpath and pass it in the field below. The page validation is the match between those two fields based ...
Dorin's user avatar
  • 1
-1 votes
1 answer
126 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
-1 votes
1 answer
62 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 ?
Michael Durrant's user avatar
-1 votes
1 answer
33 views

automated retrieval of account creation email

I'm looking to test an account-creation feature of my product. The back-end of my application (which I do not control, so I can't intercept the sending of the email) sends an email to the address of ...
Jeremy Schneider's user avatar
-1 votes
2 answers
1k views

Getting error in selenium with node.js automation

I am working on automation. I am using Selenium with nodejs code. I am just beginning to learn selenium with nodejs. I am trying to open a application, but I am getting error. Here is my sample code.....
XtremeTester's user avatar