122. Using isEditable( ) command to verify whether the Text Box field is enabled or disabled






As explained in the previous post, isEditable( ) is the predefined method of Selenium RC, which is used to verify whether the specified form element is either enabled or disabled.

isEditable( ) method will return true if the specified form element is enabled else it will return false.


Test Description:

Please go through the comments on the below screenshot to understand the Test Description




Lets Implement the Test on Eclipse IDE:

Pre-requisites:

1. Create a new Project say 'RC-Project69' in Eclipse IDE
2. Configure the Project to work with Selenium RC
3. Configure the Selenium Standalone Server to run from Eclipse IDE
4. Create a package say 'package69' under the newly created project.
5. Create a Java Class file say 'Class69' under the newly created package as shown below:




Actual Steps:

1. Write the following code into the newly created Java Class file as shown below and make sure that you resolve all the errors before going to next step:




2. Write the test method 'isEditableMethodDemo()' which uses CSS Path Statements for locating the  Text Box field and Text Area field as shown below:




3. Start the Selenium Standalone Server
4. Save and Run the 'Class69.java' file by selecting the 'JUnit Test' option and observe that our Automation code has verified whether the specified Text Box field is either enabled or disabled and typed the verification result into the Text Area field as shown in the below video:

Watch the below video:

Click here to watch the video.

Download this Project:


Click here to download this project and import into Eclipse IDE  on your machine.


Please comment below to feedback or ask questions.

Using select command to select a list item from the drop down field  will be explained in the next post.



 

Recommended Books

I recommend the following three books for learning Selenium. The first book will help you master Selenium WebDriver API commands which are used for automation any web application, where as the second book will help you in learning Core Java which is used along with Selenium API commands during Selenium Automation. The third book will make you a champ in Selenium WebDriver by covering all the topics required for learning Selenium. 

Selenium WebDriver Practical Guide (Recommended for Beginners)

Selenium WebDriver Practical Guide helps you how to set up, configure and use the powerful web UI interface automation tool. The book helps you through several Application Programming Interfaces of WebDriver that must be used in automation tests. Various implementations of this webDriver are also discussed. Step-by-step solutions and procedures are compiled in lucid language for better understanding. The book serves as an extensive guide for testing, quality assurance professionals, web application and software developers. Fundamental knowledge of Core Java is a prerequisite. The book offers the readers access to source code files. This includes HTML files which aid to work with jQuery. A large number of examples are also added in the book. Advanced operations such as double click, right click, drag and drop and action builders on web pages are detailed.

Core Java - An Integrated Approach (For coding using Selenium Commands)

Though there is a flexibility of using any language for writing automation scripts on Selenium. But most of the projects use Core Java as a language for writing automation scripts. Other languages are only used in special cases and are used in very less cases. Since Core Java is most used with Selenium in many cases, and this book concentrates more on Core Java concepts instead of unnecessary things like Advance Java Concepts etc, I have mentioned this book here. In Selenium, a tester has to know Core Java concepts to write automation scripts in Java and also to understand the framework which is developed in Java. If you are new to Java or you know very few concepts of Core Java, you have to finish this book before actually working on Selenium 1/Selenium RC and Selenium 2/Web Driver. You can learn Selenium IDE without any Java knowledge.

Selenium Testing Tools Cookbook  (Recommended for Advanced Users)

Selenium Testing Tools Cookbook is a comprehensive guide which will help the readers learn and use the Selenium WebDriver API efficiently in various situations for building reliable test automation. The book also explains the way of integrating Selenium with other popular tools and testing mobile web applications. The book has plenty of examples and follows a step by step approach for easy learning. You can keep this book as a reference while working with Selenium. The content available in this covers vast topics and is really really helpful for all the Selenium Professionals. At the same time, this book is very easy to understand as it spoon feeds all the topics.

Followers

Labels