Category "css-selectors"

CSS Child vs Descendant selectors

I am a bit confused between these 2 selectors. Does the descendent selector: div p select all p within a div whether or not it's an immediate descedent? So

How to select and manipulate specific <li> elements present with pseudo-elements such as ::marker, ::before using javascript

I'm looking for a way to access the <li> elements present with pseudo-elements such as ::before and ::marker using Javascript. So far I'm not able to writ

How to access the <li> items using Selenium webdriver

I want to access <li> items in a webpage. From the given HTML, how can I access the list items such as User, Make & Model?? I am not able to retriev

sass merge selectors on ampersand

assuming I have an existing SASS rule like: [dir] .foo { background-image: ...; // ... some more } And I want to add specific behaviors for ltr / rtl lik

How to change the styling of nested child element inside a shadow DOM using angular

I want to change the font style of a child element which is wrapped inside a parent element which is internally wrapped by others and finally it is enclosed ins

xpath to extract the text in selenium

Need help in extracting the case id, would be great help <div class="note note-info"><h4 id="note-label-CreateCaseUploadDoc:Display_Process_Com

CSS - How can I divide a list <li> in 3 columns using li:nth-child?

There are 6 elements and I want them to be something like that: - First - Third - Fifth - Second - Fourth - Sixth I tried something like this:

Selenium ignore if element not present

I have the below code for my selenium, where I need to click on carousel icons and get all the images one by one, but sometimes that carousel doesn't have more

CSS select direct children, but not if inside another nested child

So, if this is the HTML of an element: <div class="parent"> <div class="ignore-me"> <p class="child">ignore me</p>

Adding HTML via JS to a specific child-Element

I have a very specific situation where I have ~50 child-divs which I cannot influence directly, that is, I cannot add classes or ids to one specific child-div n

How to toggle between two images on click without using JavaScript

In a HTML document, I have <img src="cat-thumbnail.jpg">. When the user clicks on the image, I want to display another image instead: <img src="cat-ful

Cannot scrape the correct aspect ration of the image - Python

I'm having a problem to extract an image from a "Manga" website using python. Below is the element example on the website: img id="comic" class="loading" onerro

How to click on a descendant li element with Selenium?

I am automating with selenium and reached a point where I click a drop down and there are 3 options and they are in a ul list, and each option is an li role. I

Differences between "Click Classes" and "Click Element" in Google Tag Manager

I don't really understand the differences between Click classes and Click Element in Google Tag Manager. I don't understand the expected use of these event and

How to apply the style only if next element has specific class?

Markup: <li class="divider"></li> <li class="active"><a href="#">Home</a> <li class="divider"></li> <li><a h

How to apply the style only if next element has specific class?

Markup: <li class="divider"></li> <li class="active"><a href="#">Home</a> <li class="divider"></li> <li><a h

What is the difference between the Descendant combinator and the subsequent sibling combinator? [duplicate]

To my knowledge, the descendant combinator (space) targets child and descendants of the parent element. the subsequent sibling combinator (~)

What is the difference between the Descendant combinator and the subsequent sibling combinator? [duplicate]

To my knowledge, the descendant combinator (space) targets child and descendants of the parent element. the subsequent sibling combinator (~)

Unable to locate the Sign In element within #shadow-root (open) using Selenium and Python

I'm trying to use selenium to automate some actions but am unable to find the first element on the page https://developer.servicenow.com/dev.do and so cannot lo

CSS - Is it possible to select multiple different child elements within a parent without repeating the parent?

I've been pawing over CSS selectors all afternoon in an attempt to find an answer to this because it seems so simple but I cannot for the life of me find any so