Jump to content

IE - Java Drop Box Selection


toto22
 Share

Recommended Posts

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
Link to comment
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
 Share

×
×
  • Create New...