Creating the account (URL) globally and using that variable where ever it needed
Page 1 of 1 • Share •
Creating the account (URL) globally and using that variable where ever it needed
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.
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.

yoursjcp- Active particpant

- Posts: 10
Join date: 2010-07-22
Re: Creating the account (URL) globally and using that variable where ever it needed
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,
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,

selenium.testing07- Regular Participant

- Posts: 26
Join date: 2010-11-20
Re: Creating the account (URL) globally and using that variable where ever it needed
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
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

yoursjcp- Active particpant

- Posts: 10
Join date: 2010-07-22
Similar topics» Mods Needed
» Hakovanje Tudjeg Account-a
» Creating the account (URL) globally and using that variable where ever it needed
» Users having trouble creating an account
» Mini Dimensions
» Hakovanje Tudjeg Account-a
» Creating the account (URL) globally and using that variable where ever it needed
» Users having trouble creating an account
» Mini Dimensions
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
» sample webdriver code for php users
» which standalone server to use
» Dynamic Drop Down Selection
» It is possible to find list of all URL's exist in any web page in selenium ide
» It is possible to compare 2 same images in selenium IDE.
» how to compare 2 ULR's which is exist in same web page (View page source).
» Web Driver: Unable to click a link present inside the frame of a frameset
» Help me to get dynamicaly loaded options of dropdown in Selenium RC -Junit test case