Jump to content
toto22

IE - Java Drop Box Selection

Recommended Posts

toto22

I'm trying to click on Java Dropbox using IE. However, I'm running into problems. There is a Dropbox "Please Select" with two options "Buy" and "Sell".

I'm able to click on a drop box (please see code below) but i'm unable to select "Buy" or "Sell"".

Local $sMyString = "Please Select" ;############ ENTER #############
   Local $oLinks = _IELinkGetCollection($oIE)
   For $oLink In $oLinks
       Local $sLinkText = _IEPropertyGet($oLink, "innerText")
       If StringInStr($sLinkText, $sMyString) Then
           _IEAction($oLink, "click")
           ExitLoop
       EndIf
   Next

 

Please help

 

 
Quote

<div class="td-wb-dropdown__toggle__data td-wb-dropdown__placeholder" data-ng-class="{ 'td-wb-hide': tdWbDropdownController.isToggleHidden(), 'td-wb-dropdown__placeholder' : tdWbDropdownController.selectedItem.isPlaceholder() }" data-td-wb-dropdown-selected-item=""> <span data-translate="trading.common.PLEASE_SELECT">Please Select</span> </div>

<a href="" role="button" aria-pressed="false" class="td-wb-dropdown__item-content" data-ng-click="tdWbDropdownItemController.select()" data-td-wb-transclude=""> <span data-ng-bind="'trading.order.common.ACTION_' + item | translate">Buy</span> </a>

<a href="" role="button" aria-pressed="false" class="td-wb-dropdown__item-content" data-ng-click="tdWbDropdownItemController.select()" data-td-wb-transclude=""> <span data-ng-bind="'trading.order.common.ACTION_' + item | translate">Sell</span> </a>

OR 

//div[@id='td-wb-aria-dropdown-trading.order.common.ACTION_ARIA']/div/a/div                (XPATH:position)
//div[2]/div/div[2]/td-wb-dropdown/div/div/div/td-wb-dropdown-item[2]/div/div/a            (XPATH:position)

OR

css=div.td-wb-dropdown__toggle__data.td-wb-dropdown__placeholder
link=Buy

OR

//div[@id='td-wb-aria-dropdown-trading.order.common.ACTION_ARIA']/div/a/div    (XPATH:relative)
xpath=(//a[contains(@href, '')])[101]

  
  

 

Edited by toto22

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

  • Similar Content

    • SkysLastChance
      By SkysLastChance
      I am trying to wait for a pop up in IE. I believe it is in a IE-frame.  I am not having any luck attaching to it. The best thing I have been able to do is find the title using the below code. 
      Is there a way I can just make IE wait until it finds the  "Filed" value?  
      Thank you for any help, I am probably making this harder then it really is. 
      $oIE = _IEAttach("Meditech") $oInputs1 = _IETagNameGetCollection($oIE, "div") For $oInput1 in $oInputs1 If StringStripWS($oInput1.innertext,1) = "Filed" Then $target = $oInput1 ExitLoop Else $target = "NOT FOUND" EndIf Next I have tried different variations of
      _IEAttach("MEDITECH","Filed") WinWaitActive("MEDITECH", "Filed")  
    • levila
      By levila
      hi guys, how can i autoit IE open the downloaded item when message box pop up show class name DirectUIHWND1
      i get some codding from another source to auto cancel, but cant get idea how to get position to other option
      Do Sleep(1000) Until WinActive("[Class:IEFrame]") While WinActive("[Class:IEFrame]") Local $hIE = WinGetHandle("[Class:IEFrame]") Local $hCtrl = ControlGetHandle($hIE, "", "[ClassNN:DirectUIHWND1]") Local $aPos = ControlGetPos($hIE, "", $hCtrl) Local $aWinPos = WinGetPos($hIE) If ControlCommand($hIE, "", $hCtrl, "IsVisible") And $aPos[1] > .75 * $aWinPos[3] Then ; Check if the control is in the bottom 25% of the page. ControlClick($hIE, "", $hCtrl, "primary", 1, $aPos[2] - 70, $aPos[3] - 30) Sleep(500) ControlSend($hIE, "", $hCtrl, "{enter}") EndIf ExitLoop WEnd hope this can help, 
    • XaelloNegative
      By XaelloNegative
      Hi,
      So, I am trying to automate and simplify the retrieval of data from our company website (made by an outside company). I've had experience with IE manipulation via autoIt however, this one is a bit tricky for me.
      I have a table that has 81 cells which are buttons. What im trying to get is the information in "data-content" tag. 
      <a id="bookedVehicleLinkButton" class="btn btn-sm btn-block btn-xsm btn-success" data-toggle="popover" data-placement="bottom" data-original-title="Trip Details" data-container="body" data-content="Plate No: UGQ-857<br />Model: TOYOTA GRANDIA GL" href="javascript:__doPostBack('ctl00$ctl00$masterContentPlaceholder$reservationContentPlaceholder$bookingDataList$ctl00$vehicleDataList$ctl28$bookedVehicleLinkButton','')">IXARA (LITO SULIT)</a> Tried using the following:
      $oTagsCell = _IETagNameGetCollection($oIE, "td") For $item in $oTagsCell $test = _IEPropertyGet($item, "innertext") ClipPut($test) Next $oTagsTable = _IETagNameGetCollection($oIE, "table") For $item in $oTagsTable $test = _IEPropertyGet($item, "innertext") ClipPut($test) Next $oTagsLink = _IETagNameGetCollection($oIE, "a") For $item in $oTagsLink $test = _IEPropertyGet($item, "innertext") ClipPut($test) Next I don't receive any errors from my aforementioned attempts however no luck in getting those "data-contents". Attached is a screenshot, I do the looking of elements in chrome but the codes are for IE. And if you might ask, the cells (or buttons) have the same ID.
       
      Thank you guys for any inputs.
       
    • XinYoung
      By XinYoung
      Quick question: How can I click this "Select All" button in IE? There's no ID, and the href is "#"  
      Am I looking at the wrong html code?
      Am I looking
      Thank you all in advance!
    • Jemboy
      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.
       
       

×