This question is locked. New answers and comments are not allowed.

Charles Hammell
Top achievements
Rank 1
Charles Hammell
asked on 28 Jul 2010, 07:13 PM
I recorded a script for a text area that included several entries separated by a carriage return, for example,
keyword1
keyword2
keyword3
The Steps displayed the text property as 'keyword1[]' and then again as 'keyword2[]keyword3' (Note, I'm using [] to denote the square symbol).
When I run the script, the second step overwrites the first step, meaning, after the script is run the text area in the UI for my saved client displays:
keyword2
keyword3
I tried pasting the text property from the second step into the first one as follows: keyword1[]keyword2[]keyword3
However, it wouldn't accept the last one, and displays the text property as: keyword1[]keyword2
Does anyone know how to tackle this problem, because I may need to enter several such entries in the text area, for example,
keyword1
keyword2
....
keyword999
Thanks in advance.
keyword1
keyword2
keyword3
The Steps displayed the text property as 'keyword1[]' and then again as 'keyword2[]keyword3' (Note, I'm using [] to denote the square symbol).
When I run the script, the second step overwrites the first step, meaning, after the script is run the text area in the UI for my saved client displays:
keyword2
keyword3
I tried pasting the text property from the second step into the first one as follows: keyword1[]keyword2[]keyword3
However, it wouldn't accept the last one, and displays the text property as: keyword1[]keyword2
Does anyone know how to tackle this problem, because I may need to enter several such entries in the text area, for example,
keyword1
keyword2
....
keyword999
Thanks in advance.
5 Answers, 1 is accepted
0
Hi Charles,
Thanks for the post, I was able to reproduce the problem you are having. I'll log a bug for this, and as a work around, please convert the first test step that enters text into the text area to a customized step.
So using your example, the first step would look something like this in code:
Thanks for the post, I was able to reproduce the problem you are having. I'll log a bug for this, and as a work around, please convert the first test step that enters text into the text area to a customized step.
So using your example, the first step would look something like this in code:
Pages.SimpleForm.TestTextTextArea.Text = "keyword1";
Please modify the code so each new line you want to start will begin with "\r\n" (or each line you want to end, however you prefer to see it).
So the modified code example will be:
Pages.SimpleForm.TestTextTextArea.Text = "keyword1\r\nkeyword2\r\nkeyword3\r\n";
You would not need any further recorded steps over the text area like separate text entry test steps or Enter key press steps, just append or modify the string as above.
And should print out the following in the text area:
keyword1
keyword2
keyword3
Kind regards,
Nelson Sin
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0

Charles Hammell
Top achievements
Rank 1
answered on 28 Jul 2010, 09:27 PM
Nelson, it's me Sharan again.
I did find a workaround for that problem. During recording if I did the following:
keyword1<Shift>+<Enter>
keyword2<Shift>+<Enter>
keyword3
It would save the values in the text property correctly as follows:
keyword1[]keyword2[]keyword3
I'll try your workaround also. Btw, I'm trying to make the test data-driven, so my text property for the first keyword entry looks like this:
I did find a workaround for that problem. During recording if I did the following:
keyword1<Shift>+<Enter>
keyword2<Shift>+<Enter>
keyword3
It would save the values in the text property correctly as follows:
keyword1[]keyword2[]keyword3
I'll try your workaround also. Btw, I'm trying to make the test data-driven, so my text property for the first keyword entry looks like this:
$(KWCat1_KW1)
Would the data binding string look like this:
$(KWCat1_KW1)
\r\n$(KWCat1_KW2)\r\n$(KWCat1_KW3)
0
Hi Sharan,
The Shift+Enter on the Text Area works great, thanks for posting the sequence here.
I tried "\r\n" in the data binding screen in a few combinations, but I think WebUI will use it as part of the data string to enter.
If you are trying to data bind the step, it will probably be easiest to record the step like you are doing with Shift+Enter, date bind it like: $(KWCat1_KW1) $(KWCat1_KW2) $(KWCat1_KW3)
Then convert the step to code. You'll see the + " " + in the code, so in the quotes you can enter the \r\n.
Kind regards,
Nelson
the Telerik team
The Shift+Enter on the Text Area works great, thanks for posting the sequence here.
I tried "\r\n" in the data binding screen in a few combinations, but I think WebUI will use it as part of the data string to enter.
If you are trying to data bind the step, it will probably be easiest to record the step like you are doing with Shift+Enter, date bind it like: $(KWCat1_KW1) $(KWCat1_KW2) $(KWCat1_KW3)
Then convert the step to code. You'll see the + " " + in the code, so in the quotes you can enter the \r\n.
Kind regards,
Nelson
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0

Charles Hammell
Top achievements
Rank 1
answered on 29 Jul 2010, 05:52 PM
Hi Nelson:
I pasted the following in the Data Driven Bindings Editor for the Keywords Text Area field:
$(KWCat1_KW1)
$(KWCat1_KW2)
And it worked...refer example:
j crew men's shirts
j crew men's pants
This should be useful for now.
Thanks,
Sharan
I pasted the following in the Data Driven Bindings Editor for the Keywords Text Area field:
$(KWCat1_KW1)
$(KWCat1_KW2)
And it worked...refer example:
j crew men's shirts
j crew men's pants
This should be useful for now.
Thanks,
Sharan
0
Hi again Sharan,
Thanks again for posting the solution, I think you pretty much resolved everything yourself =) Let us know if you have anything further we can try to help out with.
Greetings,
Nelson
the Telerik team
Thanks again for posting the solution, I think you pretty much resolved everything yourself =) Let us know if you have anything further we can try to help out with.
Greetings,
Nelson
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items