Jump to content

Checking IE_Controls text

Recommended Posts

Hello people!

I checked the autoit help file and searched for this question in the forums, but didn't find specificly what I'm lookginf for. A program of mine is testing a webpage wich offers craditcard payment option. I send the teszt datas to these controls, but every so often it leave some of them empty. Rendering that "turn" useless. I tried to give them longer sleeps to be sure that the page is loaded(tried with _IELoadWait to, but seems like the page is javascripted mainly, thus _IELoadWait basicly completes much more faster then the page itself), but these solutions weren't solved the problem 100%, also sleep could delay the thing to much.

My question is, is there any function like ControlGetText or something like it, for IE automatization?

Edit: Or any other solution that I seem to miss, in this problem!

Thank you!


Edited by SorryButImaNewbie
Link to comment
Share on other sites

I tried to handle the problem with the _IEGetProperty, because if some information isnt right, or not acceptable the page change URL, I tried to check if I see that then try to reenter the datas.


If _IEPropertyGet($oIE, "locationurl") = "that url" Then
    MsgBox(0,"Hiba","Látom, hoyg szar!")

However I dont see the message box poping up, I try "locationname", maybe that works.

edit: It doesn't

Is there a problem with my code snipet? 

Edited by SorryButImaNewbie
Link to comment
Share on other sites

Hello I seems to solved the problem with a roundabout way.

I checked the page for the strings indicating x,or y, card data isn't right. like this

Local $sText = _IEBodyReadText($oIE)
    Local $CheckoKatryaSzam = StringInStr($sText, "A bankkártyaszám megadása kötelező.")
    If Not ($CheckoKatryaSzam == 0) Then
        Local $oKatryaSzam = _IEGetObjByName($oIE, "inditoKartya")
        _IEAction($oKatryaSzam, "focus")

    Local $CheckoKartyaraIrtNev = StringInStr($sText, "Kártyára írt név megadása kötelező!")
    If Not ($CheckoKartyaraIrtNev == 0) Then
        Local $oKartyaraIrtNev = _IEGetObjByName($oIE, "kartyaraIrtNev")
        _IEAction($oKartyaraIrtNev, "focus")

If it finds one it tries to fill it out again. If you see something to improve or have anycomment on the solution pls feel free to comment, I have to learn :) (MOOAAR KNOWLADGE, MOOOAR EXPERIENCE)

Thank you and have a nice life!

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

  • Recently Browsing   0 members

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