Hi,
We have a requirement to test a editbox; to enter a test string of length>16
[editbox should accept a string with a max length of 16 only]
i am using htmlinputText.Text = "some value i would enter here";
it's accepting the strings whose length is more than 16.
where as the same editbox doesnot accept string of length more than 16 when we "actually type in".
Please help.
thanks and regards,
Kiran K N
We have a requirement to test a editbox; to enter a test string of length>16
[editbox should accept a string with a max length of 16 only]
i am using htmlinputText.Text = "some value i would enter here";
it's accepting the strings whose length is more than 16.
where as the same editbox doesnot accept string of length more than 16 when we "actually type in".
Please help.
thanks and regards,
Kiran K N
10 Answers, 1 is accepted
0
Hello Kiran,
sounds like simulating real typing might do the trick.
Use this method:
e.g
Let me know whether this works!
Regards,
sounds like simulating real typing might do the trick.
Use this method:
Manager.Desktop.KeyBoard.TypeText
Manager.Desktop.KeyBoard.TypeText(
"This is some text"
, 50, 100);
Let me know whether this works!
Regards,
Stoich
the Telerik team
Interested in Agile Testing?
Check out Telerik TV for a recording of
Automated Testing in the Agile Environment
0
Kiran
Top achievements
Rank 1
answered on 07 Feb 2011, 03:06 AM
Hi Stoich,
thanx for your reply.
yes this works.
Until now we were trying not to use keyboard/mouse context. (since many testcases would fail if these two devices are disturbed or for any other reasons).
Is this the only way(using keyboard/mouse) to achieve this(my original question)?
or is there any other workarounds???
pls let me know.
Thanks and Regards,
Kiran K N.
thanx for your reply.
yes this works.
Until now we were trying not to use keyboard/mouse context. (since many testcases would fail if these two devices are disturbed or for any other reasons).
Is this the only way(using keyboard/mouse) to achieve this(my original question)?
or is there any other workarounds???
pls let me know.
Thanks and Regards,
Kiran K N.
0
Kiran
Top achievements
Rank 1
answered on 07 Feb 2011, 05:46 AM
Hi Stoich,
In addition to the above reply.
I observed one more failing scenario.
//code block
inputTextControl.Focus();
inputTextControl.MouseClick();
//write the text
kb.TypeText("Some string to be entered", 20);
I am using the above code block.
The testcase was passing in the normal scenario writing to a proper edit box.
But incase i maximise the browser. the text would be written in some other control and the Testcase would fail.
In addition to the above reply.
I observed one more failing scenario.
//code block
inputTextControl.Focus();
inputTextControl.MouseClick();
//write the text
kb.TypeText("Some string to be entered", 20);
I am using the above code block.
The testcase was passing in the normal scenario writing to a proper edit box.
But incase i maximise the browser. the text would be written in some other control and the Testcase would fail.
0
Hello Kiran,
yes, those are the only two ways you can set the Text of a element. I hope this won't get in the way of your TestCase.
Minimizing/maximizing a browser shouldn't affect the way the WebAii Framework locates elements. The problem is likely caused by your find logic. Would you please paste the logic that locates this element as well as the HTML code for this element. This info will allow me to analyze the issue!
Hope to hear from you soon!
Kind regards,
yes, those are the only two ways you can set the Text of a element. I hope this won't get in the way of your TestCase.
Minimizing/maximizing a browser shouldn't affect the way the WebAii Framework locates elements. The problem is likely caused by your find logic. Would you please paste the logic that locates this element as well as the HTML code for this element. This info will allow me to analyze the issue!
Hope to hear from you soon!
Kind regards,
Stoich
the Telerik team
Interested in Agile Testing?
Check out Telerik TV for a recording of
Automated Testing in the Agile Environment
0
Kiran
Top achievements
Rank 1
answered on 07 Feb 2011, 02:43 PM
Hello Stoich,
sorry there was a mistake in my previous comment.
It's not maximise.
It's changing the zoom. test cases using keyboard type text did fail if the browser was zoomed in.....(increasing the zoom)
Thanks and Regards,
Kiran K N
sorry there was a mistake in my previous comment.
It's not maximise.
It's changing the zoom. test cases using keyboard type text did fail if the browser was zoomed in.....(increasing the zoom)
Thanks and Regards,
Kiran K N
0
Hello Kiran,
your browser should be set to 100% zoom level when you're running tests. Changing zoom levels changes the coordinates within the browser and this can cause some types of steps to fail. Keep your execution browsers set to 100% to avoid problems.
I hope this helps!
Regards,
your browser should be set to 100% zoom level when you're running tests. Changing zoom levels changes the coordinates within the browser and this can cause some types of steps to fail. Keep your execution browsers set to 100% to avoid problems.
I hope this helps!
Regards,
Stoich
the Telerik team
Interested in Agile Testing?
Check out Telerik TV for a recording of
Automated Testing in the Agile Environment
0
Kiran
Top achievements
Rank 1
answered on 10 Feb 2011, 03:11 AM
Hi Stoich,
thanx for your reply.
I actually thought there would be some setting in manager or browser, so that the changes in zoom level doesn't affect test steps.
One more observation: This "zoom level changes" problem only affects win32 API's like keyboard and mouse operations.
all other tests executes properly :)
Regards,
Kiran K N.
thanx for your reply.
I actually thought there would be some setting in manager or browser, so that the changes in zoom level doesn't affect test steps.
One more observation: This "zoom level changes" problem only affects win32 API's like keyboard and mouse operations.
all other tests executes properly :)
Regards,
Kiran K N.
0
Hi Kiran,
thank you for the feedback, let me know if you have any other questions!
All the best,Stoich
the Telerik team
Interested in Agile Testing?
Check out Telerik TV for a recording of
Automated Testing in the Agile Environment
0
RamaRao
Top achievements
Rank 1
answered on 02 Aug 2011, 06:45 PM
New to WebAii
The below is the way I enter input how do I do with Manager.Desktop.KeyBoard.TypeText
PageManager.ManageFields.CustomFieldDetail.Elements.ValuesGrid.SetName(0, TestDataManager.DataGenerator.RandomString(101));
What does 50 and 100 represent?
The below is the way I enter input how do I do with Manager.Desktop.KeyBoard.TypeText
PageManager.ManageFields.CustomFieldDetail.Elements.ValuesGrid.SetName(0, TestDataManager.DataGenerator.RandomString(101));
Manager.Desktop.KeyBoard.TypeText(
"This is some text"
, 50, 100);
What does 50 and 100 represent?
0
Hello Ramarao,
Cody
the Telerik team
The TypeText function types keystrokes one letter at a time. The Intellisense in VisualStudio shows us that the 50 represents how much delay to insert in between each each keystroke and the 100 represents how long to simulate holding down the keystroke.
Best wishes,Cody
the Telerik team
Check out the Test Studio roadmap to find out more about the new performance testing functionality coming in our R2 2011 release this September!
Have you looked at the new Online User Guide for Telerik Test Studio?
Have you looked at the new Online User Guide for Telerik Test Studio?