Forum Discussion

Ravik's avatar
Ravik
Super Contributor
11 years ago
Solved

Select Drop down in Window base application

Hi Team,



I am automation Window base application and I am going to Data Driven Testing.

I am getting data from csv File.

Problem is that - While I am passing the value for Drop down it's not get selected and gives the Run time Error .



Code like - Sys.Process(......).WinForm(......).WinObject(.....)WinFormsObject.Keys(DDT.CurrentDriver.Value(0))



Or



Sys.Process(......).WinForm(......).WinObject(.....)WinFormsObject.ClickItem(DDT.CurrentDriver.Value(0))



Please Help.



Note- In Drop Down had 1000 of value I thing it's litile hard to check intex of all Object and Object From CSV.

  • Use Text or wText Property to set the data to drop downlist likw



    Sys..................................WinFormObject.Text = DDT.Current........

3 Replies

  • gid_216's avatar
    gid_216
    Frequent Contributor
    Use Text or wText Property to set the data to drop downlist likw



    Sys..................................WinFormObject.Text = DDT.Current........
  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi Ravi,


     


    Try converting the data you get from the DDT driver before working with it:


    var item = aqConvert.VarToStr(DDT.CurrentDriver.Value(0));


    Sys.Process(......).WinForm(......).WinObject(.....)WinFormsObject.ClickItem(item);


     


    If this doesn't help, it would be great to learn what error you get.


     

  • Ravik's avatar
    Ravik
    Super Contributor
    Thanks ! Tanya and Deepak it's work for me !!