Theme images by Storman. Powered by Blogger.

Software Testing

[best practices][feat1]

Recent

recentposts

Popular

Comments

recentcomments

Most Recent

Random Posts

randomposts

Facebook

page/http://facebook.com/letztest
Showing posts with label selenium tips. Show all posts
Showing posts with label selenium tips. Show all posts

Thursday, July 28, 2016

How to find Xpaths using WebDriver Element Locator

- No comments
Finding/Writing XPath is one of the greatest challenge that most of the automation testers come across. In this post I am going to introduce a new plugin before you which will help you in finding the right XPaths just by a click.

This plugin generates different xpaths using xpath finding techniques. With the help of this you can easily generate xpaths for C#, Java, Python, Ruby.

For downloading this plugin for Firefox > Navigate to below url:
https://addons.mozilla.org/en-us/firefox/addon/element-locator-for-webdriv/
[Update/ This plugin is deprecated and hence I reccomend to use the below one]

Firefox : https://addons.mozilla.org/en-US/firefox/addon/truepath/

Chrome: https://chrome.google.com/webstore/detail/truepath/mgjhkhhbkkldiihlajcnlfchfcmhipmn 


Once installed, you can navigate to any element and right click on that element which will generate xpath for that particular element. In the below image we have managed to find XPaths for the donate button.



For the new one it looks like this:




Now I am sure that you have got much relief for the question:

How to find XPaths in Selenium :) 

Happy Testing !

Tuesday, July 5, 2016

How to find all links on a web page using selenium webdriver C#

- No comments


Sometimes we may need to find some tricky actions on software web applications. Selenium webdriver do not have any direct method to perform any such tricky actions. So we may need to use some tricks in our webdriver test script to enable us to perform some actions on the required web applications. Today let's discuss about how to find all links on a page using selenium webdriver C#

You can use the following method to find all links on a page using selenium webdriver C#

Below is the code which finds all the links on a webpage. We are navigating to a link using Firefox. Next we get all "A" tags using FindElements and iterating through those using ForEach loop.



Wednesday, May 4, 2016

Cheat Sheet for Selenium Webdriver

- No comments


We know there are plenty of cheat sheets for various languages, libraries etc.  I am sure this cheat sheet is gonna help the one's who have started learning Selenium.

This sheet for selenium web driver provides all the important and commonly used methods, operations and commands for your easy daily access.

Selenium WebDriver Cheat Sheet


I hope this list gives you an idea on the basics of Selenium. This post was actually found in .

By the way, did I miss something? I would love to hear from you.

Happy Testing, as usual. :)

Wednesday, April 27, 2016

How to verify if a checkbox is checked using Selenium Webdriver

- No comments

It's quite a common scenario that we may come across where we need to verify if a particular check box is checked. If not checked we may want to mark it as checked. In this post let's see 

how to check if a checkbox is selected in Selenium WebDriver with C#

First of all make the check-box as a web-element.

Or using findElements code You could instead do as shown below,



What do you think on above selenium topic. Please provide your inputs and comments. You can write to me at meanurajsl@gmail.com.