Control GUI from Powershell

This topic contains 1 reply, has 2 voices, and was last updated by  Dave Wyatt 1 year, 7 months ago.

  • Author
  • #33977

    R. David Toth

    I am trying control a GUI testing platform via powershell. I have been able to:
    1) load input data from file into powershell
    2) log in to secure web page
    2) navigate to the proper 'search record' page
    3) Fill records from input file into a text box
    4) Seemingly grab a reference to a listbox
    At this point, there is a choice of several listboxes. I am not sure which part of the listbox (HTML code or other way) I have to access and manipulate in order to choose/click on the correct entry.
    The 'search' button does not activate unless the order of things is followed. I believe a click event after the listbox is 'chosen' puts the search into motion.
    Thank you,
    R. David Toth

    I have been researching on how to get this for about a week and most of the posts are how to build a new listbox in a Web page form.

  • #33980

    Dave Wyatt

    Tricky to answer without knowing more about your code and the webpage. First of all, are you using the InternetExplorer.Application COM object? If so, then you should be able to find the ID or Name (ID is better, if present) of the list box you're trying to modify, and use something like $IE.Document.GetElementById('listbox_id_here') . From there, I don't know exactly what properties or methods you'd call, but you can pipe that object to Get-Member to figure it out.

    Alternatively, you could look into something like Selenium, which is a whole suite of tools dedicated to this sort of automated testing (

You must be logged in to reply to this topic.