How do you store variables to be used later in the test?
Answer: Use the
storedVars
dictionary
Can your user extension call other commands such as
type
andclick
?Answer: Yes, they can. The commands need to call the do function name like
doType
or do click so that it can be used.
Can your user extension access the DOM programmatically?
Answer: Yes it can. The extension can access the DOM and other JavaScript APIs in the format that we saw in the previous chapter. This means that we can create new commands just for the API, making tests more verbose and easier to read.
How can a new command, created in an extension, fail a test if the new command is doing a verify?
Answer: The command will have to create a new
CommandComplete
object setting the propertyfailed
to either true or false. It is good practice to have a message in the object if the step does fail so that it can be outputted to the screen. Once the object has been populated it is passed as an argument to thecommandComplete
method.
What is a Selenium IDE add-on?
Answer: The Selenium IDE Add-on is a Mozilla Firefox add-on that allows you to extend Selenium beyond what a User-Extension can do. This then attaches itself Selenium IDE so that you can use it in conjunction with Selenium.
Selenium 1.0 Testing Tools: Beginner's Guide
By :
Selenium 1.0 Testing Tools: Beginner's Guide
By:
Overview of this book
<p>Selenium is a suite of tools to automate web application testing across many platforms. A strong understanding of using Selenium will get you developing tests to ensure the quality of your applications.</p>
<p>This book helps you understand and use Selenium to create tests and make sure that what your user expects to do can be done. It will guide you to successfully implement Selenium tests to ensure the quality of your applications.</p>
<p>The Selenium Testing Tools Beginner’s guide shows developers and testers how to create automated tests using a browser. You'll be able to create tests using Selenium IDE, Selenium Remote Control and Selenium 2 as well. A chapter is completely dedicated to Selenium 2. We will then see how our tests use element locators such as css, xpath, DOM to find elements on the page.</p>
<p>Once all the tests have been created we will have a look at how we can speed up the execution of our tests using Selenium Grid.</p>
Table of Contents (18 chapters)
Selenium 1.0 Testing Tools Beginner's Guide
Credits
About the Author
About the Reviewers
Preface
Free Chapter
Getting Started with Selenium IDE
Locators
Pattern Matching
Using JavaScript
User Extensions and Add-ons
First Steps with Selenium RC
Creating Selenium Remote Control Tests
Advanced Selenium Techniques
Getting Started with Selenium Grid
Running Selenium Tests in Parallel
Getting Started with Selenium 2
Pop Quiz Answers
Index
Customer Reviews