471 questions
0 votes
0 answers
74 views
Why can I not get this querySelectorAll to work? [duplicate]
I have an xmldoc with an SVG element that I am trying to pre-process and clean up to do some things. The actual file has several thousand elements, and I want to remove the ones I do not want in the ...
1 vote
2 answers
266 views
Default text reappears after being overwritten with intended text using Selenium Python
I am trying to extract bus prices between 2 cities in Ontario, Canada. I am using Selenium/Python to do this: The website is here and it has default cities and dates. Here is my Python code: from ...
3 votes
2 answers
89 views
JavaScript DOM manipulation in the Browser [closed]
I am trying to get an element, and element's fontSize property and update the size with keypresses. I press the up'ArrowUp' and down 'ArrowDown' but nothing happens, the fontSize property does not ...
0 votes
0 answers
77 views
Firefox remote debugging for website in python - Select element inside an iframe
I am trying to create an automation tool for scraping a site. As part of that, I am making a Python script that utilizes the Remote Debugging protocol through this library: https://github.com/jpramosi/...
1 vote
1 answer
78 views
How to get the nth DIV of a tag in HTML using VBA and selectors for export to Excel
This ist the HTML of a public website: <div class="flex flex-col md:flex-row mb-[1.0rem]"> <div class="align-text-top pr-1 md:pr-7 w-41">NUMBER:</div> <div class="...
0 votes
0 answers
183 views
How to scrape searched youtube videos with puppeteer
I am trying to use nodeJs with puppeteer to scrape for YouTube video information from the search results. Unfortunately, for some reason, the scrape doesn't load the elements via the document query ...
0 votes
0 answers
50 views
element.click() doesn't do anything (Chrome extension - injected script)
I'm injecting a script which is supposed to click on an element as soon as it appears on the browser page. It is able to find the element, however .click() doesn't actually click it, despite ...
0 votes
1 answer
61 views
Using a class to open same popup using document.querySelector
I have a popup login box on my site, I use <a class="logincontent">Login</a> which then calls up this function: document.querySelector('a.logincontent').onclick = () => { ...
1 vote
1 answer
229 views
How to parse content from HTML-code of a public website using VBA & MSXML2.XMLHTTP?
On this public website, depending on the selected federal state, 30 properties are listed on the right-hand side. If this federal state offers more than 30 properties, then another 30 are listed on ...
0 votes
1 answer
1k views
How to add an 'Enter' key event listener to an input bar that I've grabbed with querySelector?
Basically, I'm following this exercise https://www.youtube.com/watch?v=EerdGm-ehJQ&t=50183s 14n, part 2. My page looks like this:I'm focusing on the input bar with the '3' inside it When I press '...
0 votes
2 answers
167 views
How to insert HTML using querySelector & modules?
My website uses this in the frame.html head so it appears globally: <!--START: infopages--> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></...
-1 votes
1 answer
85 views
querySelector does not work on event.target
I have onClick function but I cannot access to its children elements from the event <div className="sortingBy" onClick={openSoring}> <div className="checkBox" ></div&...
3 votes
2 answers
143 views
Using querySelector in Typescript: why does it accept HTMLElement return type?
querySelector can return any subtype of Element. On a webpage this would almost certainly be either HTMLElement or SVGElement. The two are not compatible, and yet TypeScript seems happy for me to ...
3 votes
3 answers
72 views
Access buttons of a div as an array
This is a problem I was having: I am trying to access the button inside of the div and make each of them log its own text content on click. But all of them display all of the text content. And it has ...
0 votes
1 answer
232 views
How to use sibling combinator together with `:scope` in `querySelector`
Let's say I have an element and I want to select the next matching sibling. Normally, in css I'd be able to write <some selector for this element> ~ <selector for sibling>, but the sibling ...