Selenium Forum: Functional And Regression Testing Tool.
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
Display results as :
Advanced Search
Latest topics
AEM Training | Free Online DemoWed Apr 21, 2021 5:45 pmazharuddin
c# PageFactory - issue initializing elementsFri Nov 01, 2019 8:40 pmthegoatboy
Selenium making automatic connection to random urlsMon Jul 08, 2019 12:58 pmrepairtechsolutions1
How can we design the custom framework in Selenium RCMon Jun 24, 2019 2:26 pmrandybonnettes
What are the new features in Selenium 3.0Tue Jun 18, 2019 5:37 pmpappyvicky
What are you using Selenium for? Fri Apr 12, 2019 3:52 amzhl
LIMITATIONS OF SELENIUMWed Apr 10, 2019 11:23 amswara
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Go down
Archana
Archana
Regular Participant
Regular Participant
Posts : 33
Join date : 2009-08-21

database connectivity Empty database connectivity

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.
Advisor
Advisor
------------------------
------------------------
Posts : 387
Join date : 2009-07-30
Location : India
https://seleniumforum.forumotion.net

database connectivity Empty Re: database connectivity

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
Back to top
Permissions in this forum:
You cannot reply to topics in this forum