[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"me":3,"catalog:en:qa-test-automation\u002Fta-locators-selectors-strategy":4,"config":148},null,{"field_key":5,"field_name":6,"seniority":7,"topic_key":8,"topic_name":9,"spec_key":7,"spec_name":7,"locale":10,"cell_total":11,"field_total":12,"seniorities":13,"topics":17,"specs":58,"samples":63},"qa-test-automation","QA \u002F Test Automation","","ta-locators-selectors-strategy","Ta Locators Selectors Strategy","en",75,1050,[14,15,16],"junior","mid","senior",[18,21,24,27,30,33,36,39,42,45,48,49,52,55],{"key":19,"name":20,"count":11},"qa-api-testing","Qa Api Testing",{"key":22,"name":23,"count":11},"qa-automation-fundamentals","Qa Automation Fundamentals",{"key":25,"name":26,"count":11},"qa-ci-cd-testing","Qa Ci Cd Testing",{"key":28,"name":29,"count":11},"qa-defect-management","Qa Defect Management",{"key":31,"name":32,"count":11},"qa-exploratory-manual-testing","Qa Exploratory Manual Testing",{"key":34,"name":35,"count":11},"qa-performance-testing","Qa Performance Testing",{"key":37,"name":38,"count":11},"qa-test-case-design","Qa Test Case Design",{"key":40,"name":41,"count":11},"qa-test-strategy","Qa Test Strategy",{"key":43,"name":44,"count":11},"ta-cross-browser-parallel-execution","Ta Cross Browser Parallel Execution",{"key":46,"name":47,"count":11},"ta-framework-architecture-patterns","Ta Framework Architecture Patterns",{"key":8,"name":9,"count":11},{"key":50,"name":51,"count":11},"ta-selenium-cypress-playwright-tradeoffs","Ta Selenium Cypress Playwright Tradeoffs",{"key":53,"name":54,"count":11},"ta-synchronization-flaky-tests","Ta Synchronization Flaky Tests",{"key":56,"name":57,"count":11},"ta-visual-regression-reporting","Ta Visual Regression Reporting",[59],{"key":60,"name":61,"count":62},"test-automation","Test Automation",450,[64,82,95,108,121,134],{"id":65,"topic":9,"difficulty":66,"body":67,"options":68,"correct_key":70,"explanation":81},"019faeb4-4b12-781c-80c8-50e062d49e48",1,"Why is a dedicated `data-testid` attribute generally preferred over relying on CSS classes to locate elements in automated UI tests?",[69,72,75,78],{"key":70,"text":71},"a","CSS classes are usually tied to styling and change when the design changes, while a `data-testid` exists only for testing and stays stable across visual refactors",{"key":73,"text":74},"b","Browsers execute `data-testid` lookups faster than any other attribute lookup at the DOM engine level",{"key":76,"text":77},"c","CSS classes cannot be selected at all by Selenium, Cypress, or Playwright, since class attribute selectors were removed from all three tools' selector engines",{"key":79,"text":80},"d","A `data-testid` attribute is required by HTML5 for every interactive element","The correct answer is a: `data-testid` is a convention created purely for test hooks, so it does not get renamed or removed when a designer reworks the stylesheet, which is exactly what happens to CSS classes tied to styling. b is false — there is no meaningful engine-level speed difference between attribute selectors. c is false, all three tools can select by class and none of them ever removed that capability. d is false, HTML5 has no such requirement.",{"id":83,"topic":9,"difficulty":66,"body":84,"options":85,"correct_key":73,"explanation":94},"019faeb4-4b13-7609-a36e-1c2071c11ac5","What makes a locator like `\u002F\u002Fdiv[3]\u002Fspan[2]\u002Fa` fragile compared to a locator based on a stable attribute?",[86,88,90,92],{"key":70,"text":87},"XPath expressions are deprecated in modern browsers and may stop working at any time without any prior warning from the browser vendor",{"key":73,"text":89},"It depends on the exact structural position of elements in the DOM, so any markup reorder or an inserted wrapper `div` breaks it",{"key":76,"text":91},"It cannot be used in Selenium, only in Playwright",{"key":79,"text":93},"Positional XPath always runs slower than any CSS selector, regardless of DOM size","The correct answer is b: positional XPath encodes the exact tree structure, so a designer adding one more wrapper element or reordering siblings silently breaks the locator even though the target element itself never changed. a is false, XPath is not deprecated and no browser vendor has announced any such removal. c is false, Selenium supports XPath natively via `By.xpath`. d is an overgeneralization about performance, not the actual fragility problem.",{"id":96,"topic":9,"difficulty":66,"body":97,"options":98,"correct_key":76,"explanation":107},"019faeb4-4b14-7ba3-9df1-c11aa0a4f9f5","In Selenium (Java bindings), which line correctly locates an element by its CSS selector?",[99,101,103,105],{"key":70,"text":100},"driver.findElement(By.selector(\".submit-btn\", SelectorType.AUTO));",{"key":73,"text":102},"driver.querySelector(\".submit-btn\");",{"key":76,"text":104},"driver.findElement(By.cssSelector(\".submit-btn\"));",{"key":79,"text":106},"driver.findElement(CssSelector(\".submit-btn\"));","The correct answer is c: Selenium's `By` class exposes `By.cssSelector(String)` as the factory method for CSS-based locators, used as `driver.findElement(By.cssSelector(...))`. a invents a non-existent `By.selector` method and a fabricated `SelectorType.AUTO` enum that auto-detects CSS vs XPath, which Selenium's `By` API has no concept of. b invents a `querySelector` method directly on `WebDriver`, which does not exist in Selenium's API. d omits the required `By.` prefix, so it would not compile.",{"id":109,"topic":9,"difficulty":66,"body":110,"options":111,"correct_key":70,"explanation":120},"019faeb4-4b15-7416-80d8-f8bdb05103f1","In Cypress, what is the conventional way to select an element reserved specifically for test automation, following the common `data-cy` convention?",[112,114,116,118],{"key":70,"text":113},"cy.get('[data-cy=submit-button]')",{"key":73,"text":115},"cy.select('data-cy', 'submit-button')",{"key":76,"text":117},"cy.locate('data-cy=submit-button')",{"key":79,"text":119},"cy.find('#data-cy-submit-button')","The correct answer is a: Cypress does not have a dedicated data-attribute API, so the community convention is to use the generic `cy.get()` with an attribute-selector string, `cy.get('[data-cy=submit-button]')`. b invents a `cy.select` command with that signature (Cypress's real `.select()` is for `\u003Cselect>` dropdown options, not attribute lookup). c invents a `cy.locate` command that does not exist. d misuses an id selector syntax for what is actually an attribute.",{"id":122,"topic":9,"difficulty":66,"body":123,"options":124,"correct_key":79,"explanation":133},"019faeb4-4b16-7864-9f43-ece0852c2c2e","What is the primary motivation behind Playwright's role-based locators such as `getByRole('button', { name: 'Submit' })`?",[125,127,129,131],{"key":70,"text":126},"They execute faster than CSS selectors because they skip the DOM entirely and query the browser's rendering engine directly",{"key":73,"text":128},"They are the only locator type that works with Shadow DOM elements",{"key":76,"text":130},"They automatically retry failed network requests behind the element",{"key":79,"text":132},"They query the accessibility tree, so tests reflect how the element is exposed to assistive technologies and stay stable even if implementation markup changes","The correct answer is d: role-based locators query the browser's accessibility tree by role and accessible name, which means the test targets user-facing semantics rather than incidental markup, and both concerns (test stability, accessibility coverage) are addressed together. a is false, they still traverse rendering internals, not a speed shortcut. b is false, Playwright's regular locators already pierce open Shadow DOM. c is unrelated to what role-based locators do.",{"id":135,"topic":9,"difficulty":136,"body":137,"options":138,"correct_key":73,"explanation":147},"019faeb4-4b17-7000-a381-bdea46d450fd",2,"A page has several buttons all sharing the class `btn btn-primary`, and only their visible text differs (\"Save\", \"Cancel\", \"Delete\"). Which locator strategy best avoids ambiguity without adding new markup?",[139,141,143,145],{"key":70,"text":140},"Select by the shared class and always pick the first match returned",{"key":73,"text":142},"Locate the button by its visible accessible text, e.g. Playwright's `getByRole('button', { name: 'Save' })` or an XPath\u002FCSS text-based selector",{"key":76,"text":144},"Use an XPath that counts sibling position among all `.btn` elements on the page, assuming their relative order never changes across releases",{"key":79,"text":146},"Select by tag name `button` combined with the class, since that narrows the result to exactly one element","The correct answer is b: since the shared class does not disambiguate, and the visible text is the only distinguishing, stable signal, locating by that text (directly or via role+name) targets the right button regardless of DOM order. a is fragile and semantically wrong — 'first match' happens to work only by coincidence. c reintroduces positional fragility and additionally bakes in an unstated ordering assumption that can silently break. d is wrong because tag+class still matches all three buttons, it does not narrow to one.",{"fields":149,"seniorities":334,"interview_shapes":335,"locales":340,"oauth":342,"question_count":345,"coach_enabled":346,"jd_match_enabled":346},[150,175,195,212,236,249,268,287,309,315,321,328],{"key":151,"name_tr":152,"name_en":152,"sort":66,"specializations":153},"backend","Backend",[154,157,160,163,166,169,172],{"key":155,"name":156,"field":151},"general","Genel",{"key":158,"name":159,"field":151},"go","Go",{"key":161,"name":162,"field":151},"python","Python",{"key":164,"name":165,"field":151},"java","Java",{"key":167,"name":168,"field":151},"csharp","C#\u002F.NET",{"key":170,"name":171,"field":151},"nodejs","Node.js",{"key":173,"name":174,"field":151},"php","PHP",{"key":176,"name_tr":177,"name_en":177,"sort":136,"specializations":178},"frontend","Frontend",[179,180,183,186,189,192],{"key":155,"name":156,"field":176},{"key":181,"name":182,"field":176},"javascript","JavaScript",{"key":184,"name":185,"field":176},"typescript","TypeScript",{"key":187,"name":188,"field":176},"react","React",{"key":190,"name":191,"field":176},"vue","Vue",{"key":193,"name":194,"field":176},"angular","Angular",{"key":196,"name_tr":197,"name_en":197,"sort":198,"specializations":199},"fullstack","Fullstack",3,[200,201,202,203,204,205,206,207,208,209,210,211],{"key":155,"name":156,"field":196},{"key":158,"name":159,"field":151},{"key":161,"name":162,"field":151},{"key":164,"name":165,"field":151},{"key":167,"name":168,"field":151},{"key":170,"name":171,"field":151},{"key":173,"name":174,"field":151},{"key":181,"name":182,"field":176},{"key":184,"name":185,"field":176},{"key":187,"name":188,"field":176},{"key":190,"name":191,"field":176},{"key":193,"name":194,"field":176},{"key":213,"name_tr":214,"name_en":214,"sort":215,"specializations":216},"devops-cloud","DevOps \u002F Cloud",4,[217,218,221,224,227,230,233],{"key":155,"name":156,"field":213},{"key":219,"name":220,"field":213},"aws","AWS",{"key":222,"name":223,"field":213},"gcp","GCP",{"key":225,"name":226,"field":213},"azure","Azure",{"key":228,"name":229,"field":213},"kubernetes","Kubernetes",{"key":231,"name":232,"field":213},"terraform","Terraform",{"key":234,"name":235,"field":213},"linux","Linux",{"key":237,"name_tr":238,"name_en":238,"sort":239,"specializations":240},"ai-engineer","AI Engineer",5,[241,242,243,246],{"key":155,"name":156,"field":237},{"key":161,"name":162,"field":237},{"key":244,"name":245,"field":237},"llm-rag","LLM\u002FRAG",{"key":247,"name":248,"field":237},"mlops","MLOps",{"key":250,"name_tr":251,"name_en":252,"sort":253,"specializations":254},"database","Veritabanı","Database",6,[255,256,259,262,265],{"key":155,"name":156,"field":250},{"key":257,"name":258,"field":250},"postgresql","PostgreSQL",{"key":260,"name":261,"field":250},"mysql","MySQL",{"key":263,"name":264,"field":250},"mongodb","MongoDB",{"key":266,"name":267,"field":250},"redis","Redis",{"key":269,"name_tr":270,"name_en":271,"sort":272,"specializations":273},"mobile","Mobil","Mobile",7,[274,275,278,281,284],{"key":155,"name":156,"field":269},{"key":276,"name":277,"field":269},"ios-swift","iOS (Swift)",{"key":279,"name":280,"field":269},"android-kotlin","Android (Kotlin)",{"key":282,"name":283,"field":269},"flutter","Flutter",{"key":285,"name":286,"field":269},"react-native","React Native",{"key":288,"name_tr":289,"name_en":290,"sort":291,"specializations":292},"security","Güvenlik","Security",8,[293,294,297,300,303,306],{"key":155,"name":156,"field":288},{"key":295,"name":296,"field":288},"appsec","AppSec",{"key":298,"name":299,"field":288},"offensive-pentest","Offensive \u002F Pentest",{"key":301,"name":302,"field":288},"cloud-security","Cloud Security",{"key":304,"name":305,"field":288},"devsecops","DevSecOps",{"key":307,"name":308,"field":288},"blue-team-incident","Blue Team \u002F Incident",{"key":5,"name_tr":310,"name_en":6,"sort":311,"specializations":312},"QA \u002F Test Otomasyonu",9,[313,314],{"key":155,"name":156,"field":5},{"key":60,"name":61,"field":5},{"key":316,"name_tr":317,"name_en":317,"sort":318,"specializations":319},"data-engineer","Data Engineer",10,[320],{"key":155,"name":156,"field":316},{"key":322,"name_tr":323,"name_en":324,"sort":325,"specializations":326},"game-dev","Oyun Geliştirme","Game Development",11,[327],{"key":155,"name":156,"field":322},{"key":329,"name_tr":330,"name_en":330,"sort":331,"specializations":332},"ml-engineer","ML Engineer",12,[333],{"key":155,"name":156,"field":329},[14,15,16],{"junior":336,"mid":338,"senior":339},{"questions":337,"median_sec":3},20,{"questions":337,"median_sec":3},{"questions":337,"median_sec":3},[341,10],"tr",[343,344],"google","github",22200,true]