Showing posts with label CSS Locator. Show all posts
Showing posts with label CSS Locator. Show all posts

SelectorsHub is XPath, JSPath, cssSelector tool and it is very easy to understand and use. Earlier we learned how to install SelectorsHub in different browsers and basic features like how to get XPath or cssSelector of any web element to use it in selenium webdriver test script, using advanced featured from chrome devtool. I hope it has helped you lot to kick start learning it. Now we will look at few more features of SelectorsHub.

Finding XPath or CSS selector is very crucial task for selenium webdriver test script preparation and so google chrome has made it very easy for all and specially selenium users. There are many different chrome extensions available which provides this feature. But Google chrome's inbuilt Chrome Devtool is very easy to use. It has many other features as well but we will look at only XPath and CSS selector finder for now. Let's look it step by step.

Finding XPath/CSS selector of web element in chrome

Step 1 : First of all, Open your web page in google chrome browser. I will use http://only-testing-blog.blogspot.com/2014/01/textbox.html for this example. Here, we are going to find XPath and CSS selector of radio button with label Male.

Finding XPath of web element in chrome

"verifyAttribute" and "assertAttribute" commands are useful for verification of values of an attribute of any node on the page of software web application. You can check value of an attributes like class, title, id, name, type, etc.. I got many questions about "Difference between assert and verify in selenium with example" so i will describe

Locator in selenium IDE are used for locating an element on page. Selenium IDE support many types of locators like name, id, CSS and  XPath, dom, ui etc.. and from all of them, mostly used locators are nameidCSS and XPath. Selenium IDE has a facility to set your preferred locator to record it. That

As you know, Locators in selenium webdriver software testing tool are main elements and CSS Locator is another alternative of Xpath element locator, ID or Name locator or any other element locators in selenium webdriver software automation testing tool. Full form of CSS is "Cascading Style Sheets" and it define that how to display HTML elements on webpage of software web application. Click here to read more about CSS. There are few advantages and also few disadvantages of using CSS element locators at