CSS selectors
selectors
query selectors
<div class="nav nav-item" data-qa="navItem1" id="navItem1">
Nav1
</div>
"HTML element" / "Element"
.nav {
color: white;
}
CSS Rule
Attributes? Name them!
<div class="nav" data-qa="nav-section-1">
<div class="nav nav-item" data-qa="nav-item-1" id="navItem1">
Nav1
</div>
<div class="nav-item" data-qa="nav-item-2" id="navItem2">
Nav2
</div>
</div>
Quiz!
Handy shortcuts:
Cool things to remember:
or F12
or View -> Developer -> Developer Tools
or Right click -> inspect element
cmd + F on Elements tab lets you search for elements using selectors
Good for debugging and trying stuff out
Typing $$('') in console also does this (pronounced: bling bling)
use $x('') for xpath (gross)