Good
Her locator için stabilite, okunabilirlik ve actionability kontrolü yap.QA PRACTICE•PATTERNS
Lesson 20 / 20 · Beginner
Review a practical locator decision checklist.
8 min
Not completed
Locator karar sırası: role+name > label > placeholder > testid > scoped CSS > text > XPath > index. Bu mutlak kural değil; ürünün gerçek contract’ını ve bakım maliyetini değerlendiren bir başlangıç rehberidir.
Prerequisites: All previous topics
Live demo
Try the locator against the live demo.
Her locator için stabilite, okunabilirlik ve actionability kontrolü yap.Bir framework’te çalışan her selector’ı diğerine birebir taşımak.Araç syntax’ı değişebilir; locator tasarım ilkeleri korunur.
XPath her şeyi çözmez; iframe ve Shadow DOM için context sınırları ayrıca geçerlidir.
page.locator("[data-testid='patterns-demo'] button")driver.findElement(By.cssSelector("[data-testid='patterns-demo'] button"))cy.get("[data-testid='patterns-demo'] button")