Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» how to connect DB in selenium webriver
Fri Oct 06, 2017 4:09 pm by anbarasi

» How find any text in browser screen and click on it?
Thu Oct 05, 2017 2:02 pm by sandeepkommineni

» Selenium Webdriver
Tue Oct 03, 2017 1:35 pm by PiyushBiswas

» GRID setup tutorial.
Wed Sep 27, 2017 4:29 pm by johnyapp

» Drag & Drop Between Windows Using Selenium Driver
Wed Sep 27, 2017 2:10 pm by 26rondel

» Check if window is closed / verify input
Sat Sep 23, 2017 10:21 pm by brainstir

» How to work on pages with AJAX in selenium?
Mon Sep 18, 2017 6:08 pm by azharuddin

» pause test until user press a key like F2
Wed Aug 09, 2017 11:10 pm by djnforce

» Selecting the input for auto populating element
Sat Jul 29, 2017 7:53 pm by kdabbara

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

How to propagate variable between tests inside a test suite in Selenium RC

View previous topic View next topic Go down

How to propagate variable between tests inside a test suite in Selenium RC

Post by aime42 on Thu Jun 03, 2010 4:32 pm

Hi,

I am using Selenium RC with HTMLSuite.
My test suite is built with a first test, that gets initial values calling webservice and stores them in variables, then a list of tests.
My question is how I can access to store variables of the first test when the following tests of the test suite are running.

Here is the illustration of my test suite and the variables expected are l_email and l_pwd.

Thanks in advance.

Best Regards,

Aime
Code:



      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">







   
   
       
   
   
   
   
[table][tr][td][b]Test suite initialization[/b][/td][/tr][tr][td][url=http://seleniumforum.forumotion.net/./init.html]Initialization[/url][/td][/tr][tr][td][url=http://seleniumforum.forumotion.net/./login.html]Login[/url][/td][/tr] [/table]



------------ init.html ------------


      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">












   
   
   


   
   
   


   
   
   


   
   
   


   
   
   

[table border="1" cellpadding="1" cellspacing="1"][tr][td rowspan="1" colspan="3"]Initialization[/td][/tr][tr][td]open[/td][td]/ws/getUser.php?restricted=N&coef=60[/td][td][/td][/tr][tr][td]assertTable[/td][td]param.0.0[/td][td]email[/td][/tr][tr][td]storeTable[/td][td]param.0.1[/td][td]l_email[/td][/tr][tr][td]assertTable[/td][td]param.1.0[/td][td]password[/td][/tr][tr][td]storeTable[/td][td]param.1.1[/td][td]l_pwd[/td][/tr][/table]



------------ login.html ------------


      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">












   
   
   


   
   
   


   
   
   


   
   
   


   
   
   


   
   
   


   
   
   


   
   
   

[table border="1" cellpadding="1" cellspacing="1"][tr][td rowspan="1" colspan="3"]Login[/td][/tr][tr][td]open[/td][td]/[/td][td][/td][/tr][tr][td]type[/td][td]email[/td][td]${l_email}[/td][/tr][tr][td]type[/td][td]password[/td][td]${l_pwd}[/td][/tr][tr][td]click[/td][td]btn3[/td][td][/td][/tr][tr][td]waitForElementNotPresent[/td][td]//form[@id='login'][/td][td][/td][/tr][tr][td]waitForTextPresent[/td][td]Success[/td][td][/td][/tr][tr][td]assertTextPresent[/td][td]Success[/td][td][/td][/tr][tr][td]verifyTextPresent[/td][td]Success[/td][td][/td][/tr][/table]



aime42

Posts : 1
Join date : 2010-06-02

Back to top Go down

Re: How to propagate variable between tests inside a test suite in Selenium RC

Post by Adviser on Fri Jun 04, 2010 1:51 pm

Hi,

If you defined some variable in a test case and you want it to retrieve that variable into other test.

For this you have to take help of any programming language that selenium support and you have to declare all your variables global which nedd to be accessed in other test case .

By declaring global you can access that variable anywhere. But for hat I think you need to convert your all html suite into a coding block of test case.

best of luck

Bye
avatar
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