Share
Go down
avatar
yoursjcp
Active particpant
Active particpant
Posts : 10
Join date : 2010-07-22

Creating the account (URL) globally and using that variable where ever it needed

on Wed Dec 08, 2010 7:03 pm
Creating the account (URL) globally and using that variable where ever it needed.


public string acct = String.Format("selenium{0}", System.DateTime.Now.ToString().Replace("/","").Replace(" ","").Replace(":","").ToString());

In the last line of the script we will get the complete URL.
selenium.Open("http://marketing.staging.XXX.com/PM-FreeTrial.aspx");
selenium.Type("SignUp1_txtWebAddress", acct);
selenium.Type("SignUp1_txtCompanyName", acct);
//submit
selenium.Click("//a[@id='SignUp1_btnAdd']/span");

After submitting we get other link like this
selenium.Open(String.Format("http://{0}.staging.XXX.com/manager", acct ));


In the script ( "acct" is the global variable and we are prefixing with the word 'selenium' and the getting the systemdatetime and calling that variable)

The problem is : I need to use that account (URL) in the another script. to open that created account.
Can anyone please help with this.


avatar
selenium.testing07
Regular Participant
Regular Participant
Posts : 26
Join date : 2010-11-20

Re: Creating the account (URL) globally and using that variable where ever it needed

on Wed Dec 08, 2010 7:55 pm
Well,
To open this created account you need call this class or script in another class script.
Something like, you have to define multiple class.
Implement the same and let me know, if any issue?


Thanks,
Smile
avatar
yoursjcp
Active particpant
Active particpant
Posts : 10
Join date : 2010-07-22

Re: Creating the account (URL) globally and using that variable where ever it needed

on Thu Dec 09, 2010 2:42 pm
Hi
Thanks for the reply..

How to call one class or script into another script..
we cant define multiple class in a script.

Mainly we need the solution is to get the URL in to the another script and need to open that URL in another script.
We created that URL globally and calling that variable in the class and getting the final URL. I need to call this final URL in the another script.

Thanks


Sponsored content

Re: Creating the account (URL) globally and using that variable where ever it needed

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