Jump to content

Read out certain html code in the FireFox browser


Kepo
 Share

Recommended Posts

  • Use relative xpath instead of absolute xpath. That should make your code more resilient in case of website updates.
  • Unclear what your goal is with the While loop. If you are just waiting for the page to fully load, then take a look at _WD_WaitElement
  • Use _WD_ElementAction to retrieve an element's value --
    $sValue = _WD_ElementAction($sSession, $sElement, 'property', 'value')

     

Link to comment
Share on other sites

Hello Danp2
I do the while loop because another autoit program I made is reading another one. I have only provided this program with coordinates where the mouse should click and it works. now I'm just missing a few more values, such as the time specification ($ Zeit = _WD_FindElement ($ sSession, $ _WD_LOCATOR_ByXPath, "/ html / body / div [4] / div [2] / div [4] / div [ 2] / div / div / div [1] / div / div [7] / div [2] / div [2] / div / div [1] / div [2] / div / div [1] / div / div [2] ") and not the code that I get now. How do I get the relative xpath code? Already googled afterwards, but unfortunately I can't find anything. Thank you very much

Link to comment
Share on other sites

hello danp2. I am now concerned with the relative xpath and I have found the places I was looking for, but unfortunately I keep getting this code back:

$LableUSDCHF_OTC = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//* [text()= 'USD/CHF OTC']")

_WD_FindElement: {"value":{"element-6066-11e4-a52e-4f735466cecf":"66d5b748-199e-45ee-954a-61d8d9e14000"}}

 
But I want it to write down that he writes, for example, USD / CHF found and not this long code. Since I still have to build a GUI. Thank you for your help
Link to comment
Share on other sites

That's the value you need in order to further interact with the element. For example, you would retrieve the element's value with the following --

$sValue = _WD_ElementAction($sSession, $LableUSDCHF_OTC, 'property', 'value')

If you take the time to review and understand the short examples in wd_demo.au3, then that would greatly enhance your ability to accomplish your goals.

There's also this thread that contains submitted examples.

Link to comment
Share on other sites

Hy Danp2. So now I've finally managed to get an array and it gives me two values back.
Closing price:
1.25 ....
I know that you can somehow manage that you can now write this 1.25 ... somehow in an Excel file, but I haven't made it yet. 😞 I'm slowly desperate

$Openkurs = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[@class='price-info__prices']//div[1]")
$sText = _WD_ElementAction($sSession, $Openkurs, 'property', 'innerText')
$aOptions = StringSplit ( $sText, @LF,  $STR_NOCOUNT)
_ArrayDisplay($aOptions)

My excel table looks like this so far.

#include <Misc.au3>
#include <FileConstants.au3>
#include <MsgBoxConstants.au3>
#include <wd_core.au3>
#include <wd_helper.au3>
#include <JSON.au3>
#include <WinHttp.au3>
#Include "BinaryCall.au3"
#include <Excel.au3>
#include <Array.au3>


; Create application object
Local $PocketOptionExcel = _Excel_Open()

Local $sWorkbook = "C:\Users\Jürgen\Desktop\Autoit\PocketOptionExcel.xlsx"
Local $oWorkbook = _Excel_BookOpen($PocketOptionExcel, $sWorkbook)

Local $DatumEURUSD = _Excel_RangeWrite ($oWorkbook, "EURUSD", "Datum:", "A1")
Local $UhrzeitEURUSD = _Excel_RangeWrite ($oWorkbook, "EURUSD", "Uhrzeit:", "b1")
local $DauerEURUSD = _Excel_RangeWrite ($oWorkbook, "EURUSD", "Dauer:", "c1")
Local $EinstiegskursEURUSD = _Excel_RangeWrite ($oWorkbook, "EURUSD", "Einstiegskurs:", "d1")
Local $SchlusskursEURUSD = _Excel_RangeWrite ($oWorkbook, "EURUSD", "Schlusskurs:", "e1")
Local $RichtungEURUSD = _Excel_RangeWrite ($oWorkbook, "EURUSD", "Richtung:", "f1")
Local $EinsatzEURUSD = _Excel_RangeWrite ($oWorkbook, "EURUSD","Einsatz:", "g1")
Local $GewinnVerlustEURUSD = _Excel_RangeWrite ($oWorkbook, "EURUSD", "Gewinn/Verlust:", "h1")

I've already written a bot that reads something for me and it already works and it looks like this

Hier startet das Programm

Putclicked
$putClickedUSDCHF = False
$putClickedEURUSD = False
$putClickedUSDJPY = False
$putClickedUSDCAD = False
$putClickedAUDUSD = False
$putClickedEURGBP = False
$putClickedEURJPY = False

Call Clicked
$callClickedUSDCHF = False
$callClickedEURUSD = False
$callClickedUSDJPY = False
$callClickedUSDCAD = False
$callClickedAUDUSD = False
$callClickedEURGBP = False
$callClickedEURJPY = False


while 1


$CallButtonX = 888
$CallButtonY = 464

$offsetCallButtonX = 20
$offsetCallButtonY = 20

$PutButtonX = 888
$PutButtonY = 548

$offsetPutButtonX = 20
$offsetPutButtonY = 20

Text wird ausgelesen
$sLocal = ControlGetText ("Alarm", "", "[CLASS:Edit]")

Put
$PutUsdChf = ControlGetText ("Alarm", "M1 Super Kay Sniper Signale USDCHF @ Einstieg nach unten", "[CLASS:Edit]")
$PutEurUsd = ControlGetText ("Alarm", "M1 Super Kay Sniper Signale EURUSD @ Einstieg nach unten", "[CLASS:Edit]")
$PutUsdJpy = ControlGetText ("Alarm", "M1 Super Kay Sniper Signale USDJPY @ Einstieg nach unten", "[CLASS:Edit]")
$PutUsdCad = ControlGetText ("Alarm", "M1 Super Kay Sniper Signale USDCAD @ Einstieg nach unten", "[CLASS:Edit]")
$PutAudUsd = ControlGetText ("Alarm", "M1 Super Kay Sniper Signale AUDUSD @ Einstieg nach unten", "[CLASS:Edit]")
$PutEurGbp = ControlGetText ("Alarm", "M1 Super Kay Sniper Signale EURGBP @ Einstieg nach unten", "[CLASS:Edit]")
$PutEurJpy = ControlGetText ("Alarm", "M1 Super Kay Sniper Signale EURJPY @ Einstieg nach unten", "[CLASS:Edit]")

Call
$CallUsdChf = ControlGetText ("Alarm", "M1 Super Kay Sniper Signale USDCHF @ Einstieg nach oben", "[CLASS:Edit]")
$CallEurUsd = ControlGetText ("Alarm", "M1 Super Kay Sniper Signale EURUSD @ Einstieg nach oben", "[CLASS:Edit]")
$CallUsdJpy = ControlGetText ("Alarm", "M1 Super Kay Sniper Signale USDJPY @ Einstieg nach oben", "[CLASS:Edit]")
$CallUsdCad = ControlGetText ("Alarm", "M1 Super Kay Sniper Signale USDCAD @ Einstieg nach oben", "[CLASS:Edit]")
$CallAudUsd = ControlGetText ("Alarm", "M1 Super Kay Sniper Signale AUDUSD @ Einstieg nach oben", "[CLASS:Edit]")
$CallEurGbp = ControlGetText ("Alarm", "M1 Super Kay Sniper Signale EURGBP @ Einstieg nach oben", "[CLASS:Edit]")
$CallEurJpy = ControlGetText ("Alarm", "M1 Super Kay Sniper Signale EURJPY @ Einstieg nach oben", "[CLASS:Edit]")



Call und Put USDCHF

If $sLocal = $PutUsdChf Then
    ConsoleWrite("drücke Put")
    ToolTip ("Put gedrückt")

    if $putClickedUSDCHF = False Then
        MouseClick ("LEFT", 132, 156, 1, 5)
        sleep (200)
        Mouseclick ("LEFT", Random ($PutButtonX - $offsetPutButtonX, $PutButtonX + $offsetPutButtonX), Random ($PutButtonY - $offsetPutButtonY, $PutButtonY + $offsetPutButtonY), 1, 1)
        $putClickedUSDCHF = True
        $callClickedUSDCHF = False
    EndIf

ElseIf $sLocal = $CallUsdChf Then
    ToolTip ("Call gedrückt")
    ConsoleWrite ("drücke Call")

    if $callClickedUSDCHF = False Then
        MouseClick ("LEFT", 132, 156, 1, 5)
        sleep (200)
        Mouseclick ("LEFT", Random ($CallButtonX - $offsetCallButtonX, $CallButtonX + $offsetCallButtonX), Random ($CallButtonY - $offsetCallButtonY, $CallButtonY + $offsetCallButtonY), 1, 1)
        $callClickedUSDCHF = True
        $putClickedUSDCHF = False
    EndIf
EndIf




Call und Put EURUSD

If $sLocal = $PutEurUsd Then
    ConsoleWrite("drücke Put") ;### Debug Console
    ToolTip ("Put gedrückt")

    if $putClickedEURUSD = False Then
        MouseClick ("LEFT", $NameEURUSD)
        sleep (200)
        Mouseclick ("LEFT", Random ($PutButtonX - $offsetPutButtonX, $PutButtonX + $offsetPutButtonX), Random ($PutButtonY - $offsetPutButtonY, $PutButtonY + $offsetPutButtonY), 1, 1)
        $putClickedEURUSD = True
        $callClickedEURUSD = False
    EndIf

ElseIf $sLocal = $CallEurUsd Then
    ToolTip ("Call gedrückt")
    ConsoleWrite ("drücke Call")

    if $callClickedEURUSD = False Then
        MouseClick ("LEFT", $NameEURUSD)
        sleep (200)
        Mouseclick ("LEFT", Random ($CallButtonX - $offsetCallButtonX, $CallButtonX + $offsetCallButtonX), Random ($CallButtonY - $offsetCallButtonY, $CallButtonY + $offsetCallButtonY), 1, 1)
        $callClickedEURUSD = True
        $putClickedEURUSD = False
    EndIf
EndIf


    Call und Put USDJPY

If $sLocal = $PutUsdJpy Then
    ConsoleWrite("drücke Put") ;### Debug Console
    ToolTip ("Put gedrückt")

    if $putClickedUSDJPY = False Then
        MouseClick ("LEFT", 468, 157, 1, 5)
        sleep (200)
        Mouseclick ("LEFT", Random ($PutButtonX - $offsetPutButtonX, $PutButtonX + $offsetPutButtonX), Random ($PutButtonY - $offsetPutButtonY, $PutButtonY + $offsetPutButtonY), 1, 1)
        $putClickedUSDJPY = True
        $callClickedUSDJPY = False
    EndIf

ElseIf $sLocal = $CallUsdJpy Then
    ToolTip ("Call gedrückt")
    ConsoleWrite ("drücke Call")

    if $callClickedUSDJPY = False Then
        MouseClick ("LEFT", 468, 157, 1, 5)
        sleep (200)
        Mouseclick ("LEFT",Random ($CallButtonX - $offsetCallButtonX, $CallButtonX + $offsetCallButtonX), Random ($CallButtonY - $offsetCallButtonY, $CallButtonY + $offsetCallButtonY), 1, 1)
        $callClickedUSDJPY = True
        $putClickedUSDJPY = False
    EndIf
EndIf

    Call und Put USDCAD

If $sLocal = $PutUsdCad Then
    ConsoleWrite("drücke Put") ;### Debug Console
    ToolTip ("Put gedrückt")

    if $putClickedUSDCAD = False Then
        MouseClick ("LEFT", 652, 153, 1, 5)
        sleep (200)
        Mouseclick ("LEFT", Random ($PutButtonX - $offsetPutButtonX, $PutButtonX + $offsetPutButtonX), Random ($PutButtonY - $offsetPutButtonY, $PutButtonY + $offsetPutButtonY), 1, 1)
        $putClickedUSDCAD = True
        $callClickedUSDCAD = False
    EndIf

ElseIf $sLocal = $CallUsdCad Then
    ToolTip ("Call gedrückt")
    ConsoleWrite ("drücke Call")

    if $callClickedUSDCAD = False Then
        MouseClick ("LEFT", 652, 153, 1, 5)
        sleep (200)
        Mouseclick ("LEFT",Random ($CallButtonX - $offsetCallButtonX, $CallButtonX + $offsetCallButtonX), Random ($CallButtonY - $offsetCallButtonY, $CallButtonY + $offsetCallButtonY), 1, 1)
        $callClickedUSDCAD = True
        $putClickedUSDCAD = False
    EndIf
EndIf

    Call und Put AUDUSD

If $sLocal = $PutAudUsd Then
    ConsoleWrite("drücke Put") ;### Debug Console
    ToolTip ("Put gedrückt")

    if $putClickedAUDUSD = False Then
        MouseClick ("LEFT", 824, 153, 1, 5)
        sleep (200)
        Mouseclick ("LEFT", Random ($PutButtonX - $offsetPutButtonX, $PutButtonX + $offsetPutButtonX), Random ($PutButtonY - $offsetPutButtonY, $PutButtonY + $offsetPutButtonY), 1, 1)
        $putClickedAUDUSD = True
        $callClickedAUDUSD = False
    EndIf

ElseIf $sLocal = $CallAudUsd Then
    ToolTip ("Call gedrückt")
    ConsoleWrite ("drücke Call")

    if $callClickedAUDUSD = False Then
        MouseClick ("LEFT", 824, 153, 1, 5)
        sleep (200)
        Mouseclick ("LEFT",Random ($CallButtonX - $offsetCallButtonX, $CallButtonX + $offsetCallButtonX), Random ($CallButtonY - $offsetCallButtonY, $CallButtonY + $offsetCallButtonY), 1, 1)
        $callClickedAUDUSD = True
        $putClickedAUDUSD = False
    EndIf
EndIf

    Call und Put EURGBP

If $sLocal = $PutEurGbp Then
    ConsoleWrite("drücke Put") ;### Debug Console
    ToolTip ("Put gedrückt")

    if $putClickedEURGBP = False Then
        MouseClick ("LEFT", 995, 154, 1, 5)
        sleep (200)
        Mouseclick ("LEFT", Random ($PutButtonX - $offsetPutButtonX, $PutButtonX + $offsetPutButtonX), Random ($PutButtonY - $offsetPutButtonY, $PutButtonY + $offsetPutButtonY), 1, 1)
        $putClickedEURGBP = True
        $callClickedEURGBP = False
    EndIf

ElseIf $sLocal = $CallEurGbp Then
    ToolTip ("Call gedrückt")
    ConsoleWrite ("drücke Call")

    if $callClickedEURGBP = False Then
        MouseClick ("LEFT", 995, 154, 1, 5)
        sleep (200)
        Mouseclick ("LEFT",Random ($CallButtonX - $offsetCallButtonX, $CallButtonX + $offsetCallButtonX), Random ($CallButtonY - $offsetCallButtonY, $CallButtonY + $offsetCallButtonY), 1, 1)
        $callClickedEURGBP = True
        $putClickedEURGBP = False
    EndIf
EndIf


    Call und Put EURJPY

If $sLocal = $PutEurJpy Then
    ConsoleWrite("drücke Put") ;### Debug Console
    ToolTip ("Put gedrückt")

    if $putClickedEURJPY = False Then
        MouseClick ("LEFT", 1155, 153, 1, 5)
        sleep (200)
        Mouseclick ("LEFT", Random ($PutButtonX - $offsetPutButtonX, $PutButtonX + $offsetPutButtonX), Random ($PutButtonY - $offsetPutButtonY, $PutButtonY + $offsetPutButtonY), 1, 1)
        $putClickedEURJPY = True
        $callClickedEURJPY = False
    EndIf

ElseIf $sLocal = $CallEurJpy Then
    ToolTip ("Call gedrückt")
    ConsoleWrite ("drücke Call")

    if $callClickedEURJPY = False Then
        MouseClick ("LEFT", 1155, 153, 1, 5)
        sleep (200)
        Mouseclick ("LEFT",Random ($CallButtonX - $offsetCallButtonX, $CallButtonX + $offsetCallButtonX), Random ($CallButtonY - $offsetCallButtonY, $CallButtonY + $offsetCallButtonY), 1, 1)
        $callClickedEURJPY = True
        $putClickedEURJPY = False
    EndIf
EndIf


Sleep($Auslesezeit)

WEnd

Now my plan would be to write the arrays into my Excel document when my almost finished program commands it. The values all come from here

;~ Start Browser

Local $sDesiredCapabilities, $sSession
Firefox ()



;~ Variablen

$sDesiredCapabilities = '{"desiredCapabilities":{"javascriptEnabled":true,"nativeEvents":true,"acceptInsecureCerts":true}}'
$sData ='{"capabilities": {"alwaysMatch": {"browserName": "firefox", "acceptInsecureCerts":true}}}'


_WD_Startup()
$sSession = _WD_CreateSession($sDesiredCapabilities)

_WD_Navigate($sSession, "https://pocketoption.com/de/cabinet")

;~ Emaileingeben

$Email = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "/html/body/div[2]/div[2]/div/div/div/div[3]/form/div[2]/div[1]/input")
Sleep (300)
$Emaileingabe = InputBox ("Emailadresse eingeben","")
_WD_ElementAction($sSession, $Email, 'value', $Emaileingabe)
Sleep (500)

$Password = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "/html/body/div[2]/div[2]/div/div/div/div[3]/form/div[2]/div[2]/input")

$Passworteingabe = InputBox ("Passwordeingabe eingeben","")
_WD_ElementAction($sSession, $Password, 'value', $Passworteingabe)


MsgBox (0, "Captcha", "fertig gedrückt")

sleep (500)

msgbox (0, "Wähle Favoriten aus", "USD/CHF, EUR/USD, USD/JPY, USD/CAD, AUD/USD, EUR/AUD, EUR/GBP")

sleep (500)
;~ While 1

;~ Finde alle Paare
;~ USD/CHF Normal
;~ $LableUSDCHF =  _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[@class='animated zoomIn assets-favorites-item assets-favorites-item--active assets-favorites-item--active-profit assets-favorites-item--bg-red']")
;~ $NameUSDCHF = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[contains(text(),'USD/CHF')]")
;~ $WertUSDCHF = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//span[@class='profit__number']")
;~ $GewinnUSDCHF = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[@class='animated zoomIn assets-favorites-item assets-favorites-item--active assets-favorites-item--active-profit assets-favorites-item--bg-green sortable-chosen']")
;~ $VerlustUSDCHF = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[@class='animated zoomIn assets-favorites-item assets-favorites-item--active assets-favorites-item--active-profit assets-favorites-item--bg-red sortable-chosen']")

;~ USD/CHF OTC
;~ $LableUSDCHF_OTC =_WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[@class='animated zoomIn assets-favorites-item assets-favorites-item--active sortable-chosen']")
While 1

sleep (500)


;~ EUR/USD Normal
$LableEURUSD = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[@class='animated zoomIn assets-favorites-item sortable-chosen']")

;~ EUR/USD OTC
$LableEURUSD_OTC = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[@class='animated zoomIn assets-favorites-item']")
If $LableEURUSD_OTC = true Then
    ToolTip ("Lable EURUSD gefunden")
EndIf


sleep (600)


$NameEURUSD = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[contains(text(),'EUR/USD')]")

If $NameEURUSD = true Then
    ToolTip ("Name EURUSD gefunden")
EndIf

sleep (600)

$Openkurs = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[@class='price-info__prices']//div[1]")
$sText = _WD_ElementAction($sSession, $Openkurs, 'property', 'innerText')
$aOptions = StringSplit ( $sText, @LF,  1)
_ArrayDisplay($aOptions)

sleep (600)

;~ $LaufendeZeit = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[contains(text(),'04:47')]")
;~ $sText = _WD_ElementAction($sSession, $LaufendeZeit, 'property', 'innerText')
;~ If $sText = true Then
;~  ToolTip ($sText)
;~ EndIf


$Closekurs = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[@class='price-info__prices']//div[2]")
$sText = _WD_ElementAction($sSession, $Closekurs, 'property', 'innerText')
$aOptions = _ArrayToString ($sText,"|")
_Excel_RangeWrite (

sleep (600)

;~ Martin Gale
;~ If $Openkurs <= $Closekurs Then
;~  tooltip ("Setze das Doppelte")
;~  sleep (500)
;~ If $Openkurs >= $Closekurs Then
;~  ToolTip ("Einsatz bleibt gleich")
;~  sleep (500)
;~ If $Openkurs = $Closekurs Then
;~  ToolTip ("Setzte das selbe")
;~ EndIf
;~ EndIf
;~ EndIf



;~ $WertEURUSD = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//span[@class='profit__number']")
;~ If $WertEURUSD = True Then
;~  ToolTip ("Wert")
;~ EndIf


sleep (600)


$GewinnEURUSD = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[@class='animated zoomIn assets-favorites-item assets-favorites-item--active assets-favorites-item--active-profit assets-favorites-item--bg-green']")

If $GewinnEURUSD = True Then
    ToolTip ("Gewinn EURUSD")
ElseIf $GewinnEURUSD = false Then
    ToolTip ("Verlust EURUSD")
EndIf



sleep (600)

$OrdnerGeschlossen = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//a[contains(text(),'Geschlossen')]")
If $OrdnerGeschlossen = true Then
    ToolTip ("Ordner Geschlossen gefunden")
EndIf

sleep (600)

$Finalflagge = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[5]//div[1]//div[1]//span[2]")
If $Finalflagge = true Then
    ToolTip ("Finalflagge gefunden")
EndIf

sleep (600)

$LabelGeschlossen = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[@class='right-widget-container']//div[5]")
If $LabelGeschlossen = true Then
    ToolTip ("Label Geschlossen gefunden")
EndIf

sleep (600)

$NameGeschlossen = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//body[@class='is-chart minimize-right-sidebar layout-full']/div[@class='wrapper']/div[@class='wrapper__bottom']/div[@class='site-content left-shadow']/div[@id='bar-chart']/div[@class='page traderoom']/div[@class='charts single']/div[@class='right-widget-container']/div[@class='widget-slot deals']/div[@class='widget-slot__body']/div[@class='scrollbar-container deals-list ps ps--active-x ps--active-y']/div[5]/div[1]")
If $NameGeschlossen = true Then
    ToolTip ("Name Geschlossen gefunden")
EndIf

sleep (600)

$PreisGeschlossen = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//body[@class='is-chart minimize-right-sidebar layout-full']/div[@class='wrapper']/div[@class='wrapper__bottom']/div[@class='site-content left-shadow']/div[@id='bar-chart']/div[@class='page traderoom']/div[@class='charts single']/div[@class='right-widget-container']/div[@class='widget-slot deals']/div[@class='widget-slot__body']/div[@class='scrollbar-container deals-list ps ps--active-x ps--active-y']/div[5]/div[2]")
If $PreisGeschlossen = true Then
    ToolTip ("Preis Geschlossen gefunden")
EndIf

sleep (600)

$GewinnGeschlossen = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[@class='right-widget-container']//div[5]//div[2]//div[2]")

If $GewinnGeschlossen = true Then
    ToolTip ("Gewinn Geschlossen gefunden")
EndIf


;~ $VerlustEURUSD = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath,"//div[@class='animated zoomIn assets-favorites-item assets-favorites-item--active assets-favorites-item--active-profit assets-favorites-item--bg-red sortable-chosen']")
;~ If $VerlustEURUSD = True Then
;~  ToolTip ("Verlust")
;~ EndIf

sleep (600)
WEnd

;~ USD/JPY Normal
;~ $LableUSDJPY = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath,"//div[@class='animated zoomIn assets-favorites-item sortable-chosen']")
;~ $NameUSDJPY = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[contains(text(),'USD/JPY')]")
;~ $WertUSDJPY = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//span[@class='profit__number']")
;~ $GewinnUSDJPY = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[@class='animated zoomIn assets-favorites-item assets-favorites-item--not-traded assets-favorites-item--active-profit assets-favorites-item--bg-green']")
;~ $VerlustUSDJPY = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[@class='animated zoomIn assets-favorites-item assets-favorites-item--active assets-favorites-item--active-profit assets-favorites-item--bg-red']")


;~ USDJPY OTC
;~ $LableUSDJPY_OTC = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[@class='animated zoomIn assets-favorites-item assets-favorites-item--active sortable-chosen']")


;~ sleep (500)


;~ USD/CAD Normal
;~ $LableUSDCAD = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[@class='animated zoomIn assets-favorites-item sortable-chosen']")
;~ $NameUSDCAD = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[contains(text(),'USD/CAD')]")
;~ $WertUSDCAD = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//span[@class='profit__number']")
;~ $GewinnUSDCAD = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[@class='animated zoomIn assets-favorites-item assets-favorites-item--active assets-favorites-item--active-profit assets-favorites-item--bg-green']")
;~ $VerlustUSDCAD = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[@class='animated zoomIn assets-favorites-item assets-favorites-item--active assets-favorites-item--active-profit assets-favorites-item--bg-red']")


;~ USD/CAD OTC
;~ $LableUSDCAD_OTC = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[@class='animated zoomIn assets-favorites-item assets-favorites-item--active sortable-chosen']")


;~ sleep (500)


;~ AUD/USD Normal
;~ $LableAUDUSD = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[@class='animated zoomIn assets-favorites-item sortable-chosen']")
;~ $NameAUDUSD = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[contains(text(),'AUD/USD')]")
;~ $WertAUDUSD = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//span[@class='profit__number']")
;~ $GewinnAUDUSD = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[@class='animated zoomIn assets-favorites-item assets-favorites-item--active assets-favorites-item--active-profit assets-favorites-item--bg-green sortable-chosen']")
;~ $VerlustAUDUSD = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath,  "//div[@class='animated zoomIn assets-favorites-item assets-favorites-item--active assets-favorites-item--active-profit assets-favorites-item--bg-red']")


;~ AUD/USD OTC
;~ $LableAUDUSD_OTC = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[@class='animated zoomIn assets-favorites-item assets-favorites-item--active sortable-chosen']")


;~ sleep (500)

;~ EUR/AUD Normal
;~ $LableEURAUD = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[@class='animated zoomIn assets-favorites-item sortable-chosen']")
;~ $NameEURAUD = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[contains(text(),'EUR/AUD')]")
;~ $WertEURAUD = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//span[@class='profit__number']")
;~ $GewinnEURAUD = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[@class='animated zoomIn assets-favorites-item assets-favorites-item--active assets-favorites-item--active-profit assets-favorites-item--bg-green sortable-chosen']")
;~ $VerlustEURAUD = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[@class='animated zoomIn assets-favorites-item assets-favorites-item--active assets-favorites-item--active-profit assets-favorites-item--bg-red']")

;~ EUR/AUD OTC
;~ $LableEURAUD_OTC = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[@class='animated zoomIn assets-favorites-item assets-favorites-item--active sortable-chosen']")


;~ sleep (500)


;~ EUR/GBP Normal
;~ $LableEURGBP = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[@class='animated zoomIn assets-favorites-item']")
;~ $NameEURGBP = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[contains(text(),'EUR/GBP')]")
;~ $WertEURGBP = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//span[@class='profit__number']")
;~ $GewinnEURGBP = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[@class='animated zoomIn assets-favorites-item assets-favorites-item--active assets-favorites-item--active-profit assets-favorites-item--bg-green sortable-chosen']")
;~ $VerlustEURGBP = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[@class='animated zoomIn assets-favorites-item assets-favorites-item--active assets-favorites-item--active-profit assets-favorites-item--bg-red']")

;~ EUR/GBP OTC
;~ $LableEURGBP_OTC = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[@class='animated zoomIn assets-favorites-item assets-favorites-item--active sortable-chosen']")

;~ sleep (500)

;~ Finde Trade Amount

;~ $TradeAmount = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[@class='value__val']//input")
;~ InputBox ("TradeAmout", $TradeAmount)

;~ sleep (500)

;~ Finde Strike Price
;~ $StrikePrice = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[@class='block block--strike-price']")

;~ sleep (500)

;~ Finde Zeit
;~ $Zeit = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[@class='block block--time-to-purchase']//div//div[@class='block__control control']")


;~ sleep (500)

;~ CallButton
;~  $CallButton = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//a[@class='btn btn-call']")
;~  MsgBox (0,"Callbutton", $CallButton)

;~  sleep (500)

;~  PutButton
;~ $PutButton = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//a[@class='btn btn-put']")

;~ WEnd

func Firefox()
_WD_Option("Driver", "C:\Users\Jürgen\Desktop\Autoit\FireFox\geckodriver.exe")
_WD_Option('DriverParams', '--binary "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" --log trace ')
_WD_Option('Port', 4444)
EndFunc

Thank you for your help

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

  • Recently Browsing   0 members

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