Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

database connectivity

View previous topic View next topic Go down

database connectivity

Post by Archana on Sat Aug 22, 2009 2:35 pm

Hi,
I'm submitting a form through my test suite. As per my test plan, form should be submitted & if insert query goes smooth, a row should be added in my db. How can I test whether a row is really added or not? How can I check the error, if query is failed?

Also in my form, I'm getting options of a dropdown from db, How can I test whether correct options are loaded or not? If these are not possible, learning this stuff would be useless for me.

Please kindly help,

Thanks for your quick replies.

Archana
Regular Participant
Regular Participant

Posts : 33
Join date : 2009-08-21

Back to top Go down

Re: database connectivity

Post by Adviser on Sat Aug 22, 2009 6:39 pm

hi,

For checking the db query is successfully executing, you have to verify it on web page. After inserting it should be shown somewhere so verify text on that page by using command like verifyText or verifyTable if it appear in table.

If your query is failed, the data will not shown in UI. so by this way you can verify it.

For dropdown list use following command :

storeSelectedLabels ( selectLocator, variableName )

Gets all option labels (visible text) for selected options in the specified select or multi-select element.

Arguments:

* selectLocator - an element locator identifying a drop-down menu
* variableName - the name of a variable in which the result is to be stored.

Returns:
an array of all selected option labels in the specified select drop-down

For more database testing use user-extensions created in javascript. You have to write as per your requirement.Search for already created by someone.

check out this link for more details:
http://seleniumhq.org/docs/05_selenium_rc.html#database-validations

Hope this will help you. best of luck.

Bye

Adviser
------------------------
------------------------

Posts : 379
Join date : 2009-07-30
Location : India

http://seleniumforum.forumotion.net

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum