Search
 
 

Display results as :
 


Rechercher Advanced Search

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

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

View previous topic View next topic Go down

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

Post by yoursjcp 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
yoursjcp
Active particpant
Active particpant

Posts : 10
Join date : 2010-07-22

Back to top Go down

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

Post by selenium.testing07 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
selenium.testing07
Regular Participant
Regular Participant

Posts : 26
Join date : 2010-11-20

Back to top Go down

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

Post by yoursjcp 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


avatar
yoursjcp
Active particpant
Active particpant

Posts : 10
Join date : 2010-07-22

Back to top Go down

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

Post by Sponsored content


Sponsored content


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