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

[Solved] Problems with People Editor in Sharepoint 2007

1 Answer 22 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.
Raul Ribeiro
Top achievements
Rank 1
Raul Ribeiro asked on 17 Nov 2009, 12:27 PM
Greetings!
 
We are having problems interacting with the People Editor control of Sharepoint 2007 (see screenshot attached).
Whenever we record a text insertion into the People Editor, the testing framework doesn't record the corresponding step.
We had encountered a similar problem with the rich text boxes of Sharepoint 2007 and we had solved it by creating a coded step
which simulated real typing, according to your instructions in the related post. Thus, we tried to solve this problem in a similar fashion,
by creating a coded step:

[CodedStep(@"Insert People in 'People Picker'")] 
  public void InsertItemInPeoplePicker_CodedStep() 
  { 
    // Set 'textarea_PlaceH__Instructions' text to 'Example text' 
    HtmlTextArea peoplePicker = Pages.Customize_Workflow.textarea_PlaceH_ownlevelTextBox; 
     
    peoplePicker.Wait.ForExists(10000); 
    peoplePicker.ScrollToVisible(ArtOfTest.WebAii.Core.ScrollToVisibleType.ElementTopAtWindowTop); 
    ActiveBrowser.Window.SetFocus(); 
    peoplePicker.MouseClick(); 
    Manager.Desktop.KeyBoard.TypeText("Example text", 150);  
  } 

But when we execute this step, the framework throws an exception:



  ArtOfTest.WebAii.Design.Exceptions.ExecutionException: Unhandled exception thrown during automation step execution ---> System.Exception: Test 'CreateWorkFlow01' failed! 
   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteTestInCurrentContext(Test test) 
   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteTestInCurrentContext(String relativeTestPath) 
   at ArtOfTest.WebAii.Design.IntrinsicTranslators.Descriptors.ExecuteTestActionDescriptor.Execute(Browser browser) 
   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep() 
   --- End of inner exception stack trace --- 
   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep() 




How can we solve this problem?

Thank you very much for your attention,
André Silva.


1 Answer, 1 is accepted

Sort by
0
Missing User
answered on 17 Nov 2009, 09:29 PM
Hello Andre,

From viewing a text area in Sharepoint, it looks like the control is not really an html text area. If you can please try changing your code to the following:

[CodedStep(@"Insert People in 'People Picker'")]
public void InsertItemInPeoplePicker_CodedStep()
{
// Set 'textarea_PlaceH__Instructions' text to 'Example text'  
HtmlControl peoplePicker = Pages.Customize_Workflow.textarea_PlaceH_ownlevelTextBox;
peoplePicker.Wait.ForExists(10000);
peoplePicker.ScrollToVisible(ArtOfTest.WebAii.Core.ScrollToVisibleType.ElementTopAtWindowTop);
peoplePicker.MouseClick();
Manager.Desktop.KeyBoard.TypeText("Example text", 150);
}

This should click into the Sharepoint text area. If the code above still does not work, please highlight the text area, right click, and select 'Locate in DOM'. Then check to see if the text area is actually in a frame  and what it's actual html tag is.

Also, if you can right click in the Elements Window on 'textarea_PlaceH_ownlevelTextBox', select 'Edit Elements' and send us a description or screen shot of the find param for that element.

Kind regards,
Nelson Sin
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
General Discussions
Asked by
Raul Ribeiro
Top achievements
Rank 1
Answers by
Missing User
Share this question
or