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
avatar
aime42
Posts : 1
Join date : 2010-06-02

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

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]


Advisor
Advisor
------------------------
------------------------
Posts : 387
Join date : 2009-07-30
Location : India
https://seleniumforum.forumotion.net

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

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