Jump to content
Sign in to follow this  
Joro

Choose dropdowmmenu in Internet Explorer form autoit script

Recommended Posts

Hi,

I'm struggeling with the following:

In a website I have to fill in several items. For the normal fields I am able to fill in the information by using UDF "_IEGetObjByName".

But there is also a dropdown menu and I can't figure out how to choose te right information from it. I have searched the helpfile and the forum but I can't figure it out.

Here's an excerpt  from the html-page of the site where the dropdown-menu is mentioned:

<div class="col-md-10 padding-5">
 <div class="btn-group m-r">
  <input type="hidden" name="bedrijfId" class="bedrijfId" value="">
            <button type="button" data-toggle="dropdown" class="btn btn-sm btn-default dropdown-toggle" >
                 <span class="dropdown-label">Choose Company</span>
                 <span class="caret"></span>
            </button>
                  <ul class="dropdown-menu dropdown-select" >
                       <li  data-value="2" data-field="bedrijfId"><a href="#"><input type="radio" name="drp1" />Company 1</a></li>
                       <li  data-value="38" data-field="bedrijfId"><a href="#"><input type="radio" name="drp1" />Company 2</a></li>
                       <li  data-value="42" data-field="bedrijfId"><a href="#"><input type="radio" name="drp1" />Company 3</a></li>
                  </ul>
    </div>
</div>

 

How do I select one of the companies from the dropdown menu?

Thanks

Joost

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Similar Content

    • By Jemboy
      Hi,
      At work we have some proprietary website, users have to login to.
      I have "made" an autoit executable to start IE, go the website, login, so the user do not have input their credentials every time.
      By NDA I am not allowed disclosed the URL of the website nor the login credentials
      So I made a fake website and an autoitscript to illustrate my question.
      #include <ie.au3> $oIE = _IECreate ("about:blank", 0, 1, 1, 1) $HWND = _IEPropertyGet($oIE, "hwnd") WinActivate ($HWND,"") WinSetState($HWND, "", @SW_MAXIMIZE) _IENavigate ($oIE, "http://demo.rkilinc.nl",1) The above start my demo website. The actual website has some links in the footer that I do not want most people click on.
      I contacted the developers of the website and they are thinking of making an option to configure what links to show in the footer, but they said it's not a high priority for them.
       
      I discovered, that by click F12 and deleting the <footer> element the footer is delete from the live page view (until the page is reloaded off course)
      I want to automate the removal of the footer, without using things like send().
      I tried getting the footer with _IEGetObjById and deleting it with _IEAction, but that didn't work.
      Does any one has an idea how I could delete the footer directly from view with an autoit script?
      TIA, Jem.
       
       

    • By TLAM
      Hello,
      I am working on an autoIT script for CyberArk which is running Internet Explorer and connecting the user to a web application.
      For an unknown reason (I cannot explain why), IE has some trouble to start, only after a long disconnecting period (morning or after lunch). If he tries again, no problem, IE starts.
      I open a case with CyberArk but I am also searching a workaround, I thought to kill the process directly, or set a timeout with _IELoadWait but the process is not really created..

      May do you have any ideas for helping me ?

      Thanks in advance
       
    • By Seminko
      Wrote a script that grabs all of the IP addresses from Netflix's IP log, checks the IPs and returns suspicious activity.
      Everything works as it should but only when _IECreate is set to visible. When visible is set to false, it fails to login for some reason.
      Any ideas what might cause it and/or how to circumvent that?
    • By nooneclose
      Hello again, I am in phase two of my help bot. I cannot figure out how to properly code Autoit to click on a webpage button using the I.E UDF. I want to click on the button that I have attached as an image. This button does not have a name but it has an ID. Here is the HTML code for this button that I found using chromes developer inspector.
      HTML Code: 
      <img role="button" tabindex="-1" id="toolactions_INSERT-tbb_image" src="nav_icon_insertkey.gif" alt="New Work Order CTRL+ALT+I" draggable="false"> Here is the code that I have so far:
      ;******************************************************************************* ; Opens IE and fill out a New Workorder ;******************************************************************************* ; Start IE at the ** Tracking Application in ****** $oIE = _IECreate("https:I_am_Bound_by_my_company_to_not_reveal_this_webpage") ; Wait for a browser page load to complete _IELoadWait($oIE) Sleep(6000) ; Store the field names where the important data will be sent Local $nWorkOrderB = _IEGetObjById($oIE, "toolactions_INSERT-tbb_image") _IEAction($nWorkOrderB, "click")  I want my program to click on the button that looks like a piece of paper with a blue # 
      (For those wondering, I am allowed to send images just not the URL.) 
      As always any help would be appreciated. 

    • By ohaya
      Hi,
      I have a situation where I need to make one request to get a kind of pre-logon page, then click a link on that pre-logon page, which then returns a login form page, and then fill in information in the form page and submit it.
      How can I handle that using AutoIT?
      I can get the AutoIT script to tab to the link, then send an ENTER, which then causes the FORM page to appear in IE.  However, I cannot seem to get the form object from the FORM page (_IEFormGetObjByName fails when it searches for the form).  Why is that, and how can I get the AutoIT to process the FORM page?
      Thanks,
      Jim
×
×
  • Create New...