This is a migrated thread and some comments may be shown as answers.

[Solved] Storing and re-using value

3 Answers 26 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ryan
Top achievements
Rank 1
Ryan asked on 24 Feb 2009, 09:27 PM
I was wondering how to store a value from a label or text box and then later use that in another text box?

3 Answers, 1 is accepted

Sort by
0
Missing User
answered on 25 Feb 2009, 08:01 AM
Hi Ryan,
 
That is a great question, and I would like to refer you to this How-To Video that should be helpful:
Data Driven Testing Video

I hope this indeed helps and please let us know if you have any further questions about WebUI Test Studio.

Greetings,
Nelson Sin
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Ryan
Top achievements
Rank 1
answered on 25 Feb 2009, 01:34 PM
thanks for the video that showed me where to store, but I'm still confused how. I have a value that is set in a label i want to retrieve that value and paste it in a text box on the next page. The application I'm testing submits an order then we use the order id to search for it to approve it, I need to retrieve thats value to complete testing the order. 
0
Missing User
answered on 25 Feb 2009, 04:39 PM
Hello Ryan,

WebUI Test Studio does not have the functionality you are describing out-of-the-box, but it is something we may consider incorporating into the product. A work-around in the meantime could be that you record a value as a step, then data drive it with possible inputs. You could then create verification steps on the results that can be data driven on what would be the expected outputs.

Large data sets could be handled via the Database option or a .csv file. This may not be ideal for a extremely large mapping of data that is dynamic for all possible inputs, but it could give you a large enough test sample size to give you a good idea about the working condition of your code.

Another option would be to add the functionality through custom code, such as converting recorded steps to code for setting the Google Text Box:

[CodedStep(@"Set 'input_Text_Q' text to 'google'")]
public void WebAiiTest1_CodedStep1(){
HtmlInputText
input_Text_Q = Pages.Google.input_Text_Q;
input_Text_Q.Wait.ForExists(10000);
input_Text_Q.Text =
"google";
}

Then, using the value that is still in the Google Text Box in a custom method to navigate back to Google:

[CodedStep(@"Navigate back to Google")]
public void MyCustomFunction(){
// Navigate to : 'http://www.google.com/'
ActiveBrowser.NavigateTo("http://www."+ Pages.Google.input_Text_Q.Value.ToString() + ".com")
}

Hope this helps.

Regards,
Nelson Sin
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
General Discussions
Asked by
Ryan
Top achievements
Rank 1
Answers by
Missing User
Ryan
Top achievements
Rank 1
Share this question
or