Forum Discussion

gita3632's avatar
gita3632
Contributor
14 years ago

Need a sample script on SELECTING a VALUE from a DROPDOWN List

http://www.google.com/



1- Can someone please send me a sample Jscript as to how to select a specific value from a dropdown list like selecting a value from the "More" option on google site.



2- Also if possible, please instruct me on the steps as to how I can validate all these values against a dbase table.   Please be as specific as possible.





Thanks

Gita

1 Reply

  • Hi,



    1. Use code like this:

    var page = Sys.Process("iexplore").Page("*")

    page.Panel("ghead").Panel("gog").Panel("gbar").Link(1).Click();

    page.Refresh();

    var link = page.Panel("ghead").Panel("gog").Panel("gbar").Panel("gbi").Find("innerText", "Put the link caption here");

    if(link.Exists && link.VisibleOnScreen) link.Click();




    2. You can use either DDT to get values from your DB table, or connect to it via ADO. You can find the appropriate connection string for your DB here.

    Once you connect to your DB table, retrieve the needed values from it and compare them with those you want to validate.