Forum Discussion

sarya's avatar
sarya
Frequent Contributor
14 years ago

Need help selecting item from drop-down button

Hi,



I am trying to select an item from the drop-down button but somehow it clicks the checkbox next to it .Please help regrading this.It is a drop-down with values cat1 and cat2. IF I want to select cat2 ,somehow it opens the drop-down but it is not able to select cat2 and indeed checks the checkbox below it as it falls just under the cat2 item when the drop-down is expanded..The use of keyboard clicks up and down do not work. The only thing I can do in the script is :

page.document.all.Item("catalog").ClickItem(Ctlg);





Thanks.

  • prakashk's avatar
    prakashk
    Occasional Contributor
    Hi sumedha arya,



    'Using Map Object from Screen,

    1. First Map the Page (Drag the target to point to object)



    Set iexplore = Aliases.IEXPLORE


     


    Set Page = iexplore.pageLogin


    Page.Wait



    ' Select Value from Catalog Drop Down

    PropArray = Array ("ObjectType", "ObjectIdentifier")


    ValuesArray = Array ("Select", "Catalog")


    Catalog = Page.FindAllChildren(PropArray, ValuesArray,11)


    Catalog (0).ClickItem("Cat2")

    (or)

    ContractVeh(0).ClickItem(2)

    (or)



    ' If u pass from Excel


    If drv.Value("CatalogVal")<>"" Then

    Catalog (0).ClickItem(drv.Value("CatalogVal"))

    End If






    ' Click on Check Box


    PropArray = Array ("ObjectType", "ObjectIdentifier")


    ValuesArray = Array ("Checkbox", "Remember")


    RememberCheckbox = Page.FindAllChildren(PropArray, ValuesArray,11)


    RememberCheckbox (0).ClickChecked(True)






    If u want more details send me a detailed problem and screen shot, I'll Explain You...

    Feel free to contact me, if u have any doubts



    Regards,

    -Prakash