Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» Regarding Alert Interface
Fri Feb 24, 2017 2:00 pm by karthikeyakumar

» Geting issues in identifying the elsements in webdriver
Fri Feb 17, 2017 4:41 pm by janbaskt

» WebDriver - why not to use a singlton for it?
Fri Feb 17, 2017 4:40 pm by janbaskt

» WebDriver session when using testng annotation to invoke driver instance
Fri Feb 17, 2017 4:39 pm by janbaskt

» Selenium fails to launch Chrome
Fri Feb 17, 2017 4:39 pm by janbaskt

» why do i get this error
Fri Feb 17, 2017 4:38 pm by janbaskt

» Selenium Tutorial
Thu Feb 16, 2017 5:21 pm by Rahul

» When to use Selenium IDE, RC and WebDriver
Mon Feb 13, 2017 2:35 pm by azharuddin

» How to integrate selenium with ZAPI-Zephyr
Sat Feb 11, 2017 2:25 am by gseera002c

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.



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

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



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