Forum Discussion

Anumakonda_mahe's avatar
Anumakonda_mahe
Frequent Contributor
13 years ago

How to Count No. of Text Area in a screen by using VB script

Hi all,



our application is developed using . net. we have a field call no. of sections required, if we enter 3 / 4 then screen refress and displays 4 Text areas, so i have to check displayed text areas are matching with the value entered at No. of sections.



Pls. find screen shot and help me out

2 Replies

  • Anumakonda_mahe's avatar
    Anumakonda_mahe
    Frequent Contributor
    i am trying with this code


    Sub



    Test2()



    Dim PropNames, PropValues, LastResult



    PropNames = Array("ObjectType")



    PropValues = Array("Textarea")



    LastResult =



     



    NameMapping.Sys.iexplore.pageCaliberlims320.formF1.table.cell.table.cell.frameAppbody.frameBodyframe.formForm1.tableTable1.cell.tableSubtable.FindAllChildren(PropNames, PropValues, 1000, True).Name



    Call



     



    Log.Message(LastResult, "")



     



    End



    Sub


  • Anumakonda_mahe's avatar
    Anumakonda_mahe
    Frequent Contributor
    I got it i have used below code.




    Sub Tofindfieldcount()



    DIM Fieldslist, Fieldsinscrn



    Fieldslist = Aliases.iexplore.mainpage.formF1.table.cell.table.cell.frameAppbody.frameBodyframe.formForm1.cellMaintd_2.tableDistable.FindALLChildren(Array("ObjectType"), Array("Textarea"), 1000, True)



    Fieldsinscrn = uBound(Fieldslist)



    Log.Message(Fieldsinscrn)



    End Sub