Skip to content

Category: Questions

get value from command log in cypress

I m trying to get value from command log in cypress . I tried to get by css selector but I could not get the value. I tried custom commands but I couldnt get it . On the webpage that I do automation test, there s a download button. when I click the button I got the exe file .

Single function for saving into localStorage?

How can we save and retain localStorage objects rather than creating multiple functions ? The first localStorage object get replaced with the new save. So to avoid that I have created a new function called saveLocalStorageDataTwo which is working. But how can we avoid creating multiple functions for saving da…

three.js over cdn using svelte or react

Is there any way of building my svelte or react application in a way, that the three.js module (which I usually import using npm) will be declared as a script tag which will call the module from a CDN? I would like to keep the advantages of a framework but also be able to reduce my final bundle size, since

Comparing color strings in typescript

I am trying to compare the following color strings with each other, i am using localeCompare for this and here we have the following colors: ‘yellow’, ‘green’, ‘white’ and transparent. These are saved in the variable ‘status’ as shown below. How can i compare th…

Scroll up for each article

I have a list of articles on my page, and starting with the second article there should be a scroll up button. The question is how to do it correctly. Here is my code php.blade js Now my code adds a scroll button for each new blog, but it works only for the first one, maybe this Scroll up code

Function call after body.onload returns unwanted result

I have the following problem: This script gives me the desired result: 1 However, the script is executed in my code only with document.body.onload: But in this case the result is not 1, but [object Event]. What do I have to do to get 1 as result? Answer I’m not sure if this is what you mean: Basically, …