.. _selectors:
.. index:: selector, DOM, HTML
=========
Selectors
=========
uitest makes an heavy use of selectors in order to work with the `DOM `_, and can transparently use either `CSS3 `_
All the examples below are based on this HTML code:
.. code-block:: html
My page
Hello uitest
.. index:: CSS, CSS3
CSS3
----
By default, uitest accepts `CSS3 selector strings `_ to check for elements within the DOM.
To check if the ```` element exists in the example page, you can use::
var win = UT.open('http://domain.cc/page.html',function(){
describe("h1.page-title", function () {
it("h1.page-title to exist", function () {
expect('h1.page-title').toExist();
})
})
})