locked
Problem with identifying object in CodedUI Automation RRS feed

  • Question

  • When i add a certain object(Date Combobox) of the silverlight application then in UIMap i see following heirarch-

    -UIitemcombobox

        -UiShowCalendarbutton

        -UITextboxedit

    We have below mentioned solution to write value in this datecombobox.

    -UIitemcombobox.UITextboxedit.text="date";

    Is there any other way to write values in such datecombobox?

    we tried with one more line of code(mentioned below), but it is throwing an error that , "Cannot perform 'SetFocus' on the control as this control is hidden"

    UIitemcombobox.selecteditem="date";

     

     

     

        

          

     

     

     

    Tuesday, February 22, 2011 9:51 AM

Answers

  • Hi Gaurav,

    What you have attempted seems the right way, particularly because this is a customized combobox with DatePicker inside it.

    Not sure if this would work, but I'm just making a wild guess on some assumptions based on the hierarchy of your control.

    1. Try expanding the combobox - A click on the combobox

    2. Setvalue on the Calendar control - Calendar.SelectedDateAsString = "date";

    NOTE : This would work if the Calendar control is editable upon expanding the combobox.

    Thanks,

    Vishnu

     


    Please mark this post as answer if this answers your question
    Tuesday, February 22, 2011 4:12 PM
    Moderator