Category : selector

I have the following javascript code, which I want to implement in puppeteer, to do something like: await page.click(myDivs[0]) const myDivs = []; for (const div of page.querySelectorAll(“div.b-swatch-value-wrapper”)) { if (div.querySelector(“span.b-swatch-value–orderable”) !== null) { myDivs.push(div.b-swatch-value-wrapper); } } Like this its obviously not working, but how do I do this? Thank you in advance 🙂 Source: ..

Read more

I want to get every <div class="b-swatch-value-wrapper">, containing a span, which contains the class ="b-swatch-value–orderable". I unfolded one div for the screenshot. The other divs are some containing the class, some are not. If not the span is still existing, just without this class. I want to declare every div, which is containing this class, ..

Read more

I am trying to select two images using Javascript Query Selector and swap them with a click. However if select the image themselves with their Ids the console log shows a null value and if i do it through a list it does not work. At first I thought maybe because the system cannot find ..

Read more

Im trying to find a selector to the following button: Inspecting Button I need this for a Puppeteer headless chrome task. e.g.: await page.waitForSelector(The selecor comes here); The site: https://www.notebooksbilliger.de/ The button appears after adding a random product to cart and then redirect to: https://www.notebooksbilliger.de/kasse/anmelden Would appreciate some help, wasted many hours trying to solve ..

Read more

i want select two word by javascript and set style for that. I have three word in my html body like: "," & "،" & "/". My code is below and work for only one word. <html> <style> .myword { color:red; } </style> <body class=”my-page”> <div class=”cats”> <a href=”https://example.com” rel=”tag”>steel</a> , <a href=”https://example.com” rel=”tag”>plastic</a> ، ..

Read more

In a form there is a section that shows groups of 4 weeks in each div. See the code below <div class="form-check" data-weeknr="1,2,3,4"></div> <div class="form-check" data-weeknr="5,6,7,8"></div> <div class="form-check" data-weeknr="9,10,11,12"></div> <div class="form-check" data-weeknr="13,14,15,16"></div> <div class="form-check" data-weeknr="17,18,19,20"></div> … This continues until it reaches <div class="form-check" data-weeknr="49,50,51,52"></div> I have a code that grabs the current week by the ..

Read more