This question is locked. New answers and comments are not allowed.
Greetings!
I am running into a few problems using Test Studio with Microsoft Office Sharepoint Server 2007.
I was trying to record a very simple test, by creating a new item in a Custom Sharepoint list.
Each item contains only two fields: a string (Title) and a rich text field (Description).
The Test Studio seems to have no problems recording all the events leading up to the insertion of text
into the Description rich text field: clicking the list link, the new item button, and the insertion of text into the Title field.
However, it is not capturing what the user inserts into the rich text field.
I have tried to work around this problem by converting the test into a VS unit test and by analysing the Sharepoint HTML source, looking
for a way to "tweak" the test code.
The Sharepoint HTML elements I have identified, regarding the rich text field is similar to
<textarea name="TextField" rows="6" cols="20" id="TextFieldID" title="RichTextTest" class="ms-long" dir="none"></textarea>
Using the DOM Explorer and the Elements Explorer, I created an entity representing this HTML element, and I have tried to inject
the value I want into its "text" property.
HtmlTextArea myVar = Pages.CustomList__New_Item.textarea_M_G_Bf__TextField;
myVar.Wait.ForExists(10000);
myVar.Click();
myVar.Text = "Text I want in the rich text field";
However, when I save the item, the rich text field remains empty.
Can someone please help solving this problem?
- Why can't the Test Studio capture the typing event into the rich text field?
- Why isn't the workaround effective? Wasn't it suposed to inject the value into the rich text field?
- Do you have any suggestions regarding this issue?
If you want, I can send you the complete source code, or some other additional information you require.
Thank you very much for your attention,
André Silva.
I am running into a few problems using Test Studio with Microsoft Office Sharepoint Server 2007.
I was trying to record a very simple test, by creating a new item in a Custom Sharepoint list.
Each item contains only two fields: a string (Title) and a rich text field (Description).
The Test Studio seems to have no problems recording all the events leading up to the insertion of text
into the Description rich text field: clicking the list link, the new item button, and the insertion of text into the Title field.
However, it is not capturing what the user inserts into the rich text field.
I have tried to work around this problem by converting the test into a VS unit test and by analysing the Sharepoint HTML source, looking
for a way to "tweak" the test code.
The Sharepoint HTML elements I have identified, regarding the rich text field is similar to
<textarea name="TextField" rows="6" cols="20" id="TextFieldID" title="RichTextTest" class="ms-long" dir="none"></textarea>
Using the DOM Explorer and the Elements Explorer, I created an entity representing this HTML element, and I have tried to inject
the value I want into its "text" property.
HtmlTextArea myVar = Pages.CustomList__New_Item.textarea_M_G_Bf__TextField;
myVar.Wait.ForExists(10000);
myVar.Click();
myVar.Text = "Text I want in the rich text field";
However, when I save the item, the rich text field remains empty.
Can someone please help solving this problem?
- Why can't the Test Studio capture the typing event into the rich text field?
- Why isn't the workaround effective? Wasn't it suposed to inject the value into the rich text field?
- Do you have any suggestions regarding this issue?
If you want, I can send you the complete source code, or some other additional information you require.
Thank you very much for your attention,
André Silva.