Selenium IDE javascript throwing exception

339
July 20, 2017, at 04:50 AM

I am trying to extract a portion of an iframe that I have stored as a variable named programID

stored variable /

programID = "<iframe src="http://seibhi.link.com/programs/100/this-program-is-a-test" height="1000" width="100%" />"

Selenium Command

storeEval | javascript{storedVars['programID'].substring(61, 63);} | test

Imagine the link string is much longer so the sub string of 61 - 63 actually gets the 100 value and stores that.

Selenium will return [error] Threw an exception: unterminated regular expression literal in the Log

READ ALSO
unable to show loading spinner image when the page is loading for the second time

unable to show loading spinner image when the page is loading for the second time

I want to show the loading spinner when page is loading/waiting to get the response from backendBelow code loads the pdf file and show on webpage

208
Taking advantage of ES6 default parameters with Mongo

Taking advantage of ES6 default parameters with Mongo

I am wondering if there is a way I can construct mongo's queries to take advantage of es6 default parametersI have the following method

236
JavaScript making users click before executing next action

JavaScript making users click before executing next action

We do currently have a button which does send an action to an APIThis is a giveaway app

261
Mock Window or Document object with Jest

Mock Window or Document object with Jest

How do you mock (and then test) the Window or Document object with Jest? Especially when it has nested functions that may not yet defined in the file you're testing Eg

1325