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 was wondering how I read data inside of a iframe. I would like to be able to click something inside a iframe. However, I can't even find the tag. 
      The id and name change all the time so I can't use those. 
      The code highlighted in blue is what I am trying to click. (second picture)
      Here is what I have tried.
      $target = "" $tags = $oIE.document.GetElementsByTagName("div") For $tag in $tags $class_value = $tag.GetAttribute("class") If string($class_value) = "s_92 altstyle s_93 s_94" Then $target = $tag ConsoleWrite("Tag Found " & $target.outerText&@CRLF) ExitLoop EndIf Next  

       
       

    • SkysLastChance
      By SkysLastChance
       
      WinActivate("MEDITECH - Internet Explorer") Sleep (500) $oIE = _IEAttach("MEDITECH") $oDiv1 = _IEGetObjById($oIE, "sysmenu-searchbarbutton") _IEAction($oDiv1, "click") I am just trying to click the little magnifying glass, next to the gear button with no luck. I was hoping someone might have an idea why this is not working?
       

    • SkysLastChance
      By SkysLastChance
      I am trying to type a name in patient summary search box. How should I go about doing this. I am clearly not doing it right. (Attached Picture of HTML code.)
      This is what I have tried. I assume this is not working because it is not a form? 
      WinActivate("MEDITECH - Internet Explorer")       Sleep (500)    $oIE = _IEAttach("MEDITECH")    $oForm = _IEFormGetObjByName($oIE, "systemMenu")    $oText = _IEFormElementGetObjByName($oForm, "sysmenu-searchbarinput") _IEFormElementSetValue($oText, "Hey! This works!")
    • aiter
      By aiter
      Just want to report a warning I get when using IE udf and running from F5 in scite

      -> IE.au3 T3.0-2 Warning from function internal function __IEIsObjType, Cannot register internal error handler, cannot trap COM errors (Use _IEErrorHandlerRegister() to register a user error handler)
      When I look at IE.au3 I see a comment that this function has been removed as there are no more fatal errors.
       
    • aiter
      By aiter
      I created a webpage using the IE udf. Great, but then I noticed I cannot do a ctrl-F to find something on the page. 
      If I save the page then bring that page up I can find things of course.
      Its trivial really, but is there way to get the ctrl-F to work when the page is generated without resorting to having to save?
×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.