Jump to content

Recommended Posts

Posted

Hello, help to press the button, please.

<button class="bali-button bali-button_type_green bali-button_call_put bali-button_call" data-reactid=".0.0.0.0.3.0.0.0.1.1.0.1.1.0"><span class="bali-button__ico" data-reactid=".0.0.0.0.3.0.0.0.1.1.0.1.1.0.0"></span><span class="bali-button__label" data-reactid=".0.0.0.0.3.0.0.0.1.1.0.1.1.0.1"><span class="" data-reactid=".0.0.0.0.3.0.0.0.1.1.0.1.1.0.1.0">Выше</span></span></button>

Does not work

$oIE = _IEAttach ("Платформа")
Sleep(1000)
$oLinks = _IETagNameGetCollection ($oIE, 'button')
For $oLink in  $oLinks
   If $oLink.InnerText == 'Ниже' Then
      _IEAction ($oLink, 'click')
   EndIf
Next

 

Posted

Thanks, I need to press "ВЫШЕ" or "НИЖЕ"
Still here such variant

#include <Array.au3>
#include <IE.au3>

Local $aIe[0], $oIe = _IECreate("https://alpari.com/ru/binary_options/binary_trader/")
$oCol = _IETagNameGetCollection($oIe, 'button')
For $oIn In $oCol
    $iUb = UBound($aIe)
    ReDim $aIe[$iUb + 1]
    $aIe[$iUb] = $oIn.classname
    If $aIe[$iUb] == "bali-button bali-button_type_orange bali-button_call_put bali-button_put" Then _IEAction($oIn, 'click');

Next
_ArrayDisplay($aIe, 'ma:')

Errors in the console are not present

Posted

@Danp2 Not to bother you, but take this one from _IECreate()?

SciTE4AutoIt = 3.7.3.0   AutoIt = 3.3.14.2   AutoItX64 = 0   OS = Win_10   Build = 19044   OSArch = X64   Language = 0407/german
H:\...\AutoIt3\SciTE     H:\...\AutoIt3      H:\...\AutoIt3\Include     (H:\ = Network Drive)

   88x31.png  Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind.

Posted
47 minutes ago, Danp2 said:

@Roxanne_Ritchi Эта информация может быть полезной, даже если она не содержит ошибок.

>"C:\Program Files (x86)\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Users\Administrator\Desktop\alp v.7 3 09.au3"    
>Exit code: 0    Time: 22.1

 

49 minutes ago, Danp2 said:

Can you provide a URL for the site?

https://alpari.com/ru/binary_options/binary_trader

Posted

The text is wrapped inside <span> tags, not <button>. So innertext should also contain the span tags, try this:

$oIE = _IEAttach ("Платформа")
Sleep(1000)
$oLinks = _IETagNameGetCollection ($oIE, 'button')
For $oLink in  $oLinks
   If StringInStr($oLink.InnerText, "Ниже") <> 0 Then
      _IEAction ($oLink, 'click')
   EndIf
Next

 

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...