Good
Attribute ve container ilişkilerini birleştiren okunabilir CSS kullan.QA PRACTICE•CSS
Lesson 5 / 20 · Beginner
Use attribute, child, sibling, and state selectors.
12 min
Not completed
CSS attribute operatörleri `^=` starts-with, `$=` ends-with, `*=` substring, `~=` whitespace-separated word ve `|=` prefix/locale eşleşmesidir. `:nth-child` tüm kardeşleri sayar; `:nth-of-type` sadece aynı tag türünü sayar. `:has`, `:is`, `:not`, `:checked` ve `:disabled` güçlü ama hedef tarayıcı/runner desteğini kontrol et.
Prerequisites: ID, name, class
Live demo
Try the locator against the live demo.
Attribute ve container ilişkilerini birleştiren okunabilir CSS kullan.Sadece sıralamaya dayalı `:nth-child()` ile kimlik kurma.CSS kısa ve hızlıdır; doğru contract ile scoped ve bakımı kolay olabilir.
`:contains()` browser CSS selector değildir.
page.locator("[data-testid='css-demo'] input[name='email']")driver.findElement(By.cssSelector("[data-testid='css-demo'] input[name='email']"))cy.get("[data-testid='css-demo'] input[name='email']")