Sign in to follow this  
Followers 0
ygoldshtrakh

IE.3au

6 posts in this topic

Hello Guys,

First of all thank you for the great tool! I've worked with Segue before and I can tell you that AutoIt is as powerfull as Silk with no "extras" and a huge fee:)

I've been using IE.3au for automated testing of aour website and everything looks perfect so far, but radio and check boxes, Looks like i just hit the wall with those once, just cannot check the one i need since they all have the same names and i cannot pull the index for some reason. What i tried to do is get the first index by the box name and that just increment it to the one I actually need to click.

Thanx for your help

Share this post


Link to post
Share on other sites



Hello Guys,

First of all thank you for the great tool! I've worked with Segue before and I can tell you that AutoIt is as powerfull as Silk with no "extras" and a huge fee:)

I've been using IE.3au for automated testing of aour website and everything looks perfect so far, but radio and check boxes, Looks like i just hit the wall with those once, just cannot check the one i need since they all have the same names and i cannot pull the index for some reason. What i tried to do is get the first index by the box name and that just increment it to the one I actually need to click.

Thanx for your help

<{POST_SNAPBACK}>

you may want to include some portion of the code you've tried, and a link to the page you're trying to interact with, for troubleshooting purposes...

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

; Set field values and submit the form

_IEFormElementSetValue($o_order_tracking,"123456")

_IEFormElementSetValue($o_due_time, "{ts '1899-12-30 16:30:00'}")

_IEFormElementSetValue($o_due_date, "06/25/2005")

_IEFormElementSetValue($o_purpose_id,"2")

;Click on Form Type

$o_individual_bpo_amount.click

;click on order type

$o_RadioButton=$oIE.document.getElementByValue("individual");

$o_RadioButton=$o_RadioButton+1

$o_RadioButton.click

<input type="Radio"

name="ORDER_METHOD"

value="upload" checked="Yes"

onclick="this.form.individual_bpo_amount.style.backgroundColor ='cccccc'; this.form.individual_bpo_amount.disabled=true;">

Upload Property Order File (CSV, XLS, DOC, TXT, XML)<br>

<input type="radio"

name="ORDER_METHOD"

value="individual"

onclick="this.form.individual_bpo_amount.style.backgroundColor ='ffffff';

this.form.individual_bpo_amount.disabled=false;"

>Manual Property Entry

(If so, How Many

<input disabled style="background-color: cccccc;"

type="text" name="individual_bpo_amount"

size="3" maxlength="3">)

Share this post


Link to post
Share on other sites

; Set field values and submit the form

_IEFormElementSetValue($o_order_tracking,"123456")

_IEFormElementSetValue($o_due_time, "{ts '1899-12-30 16:30:00'}")

_IEFormElementSetValue($o_due_date, "06/25/2005")

_IEFormElementSetValue($o_purpose_id,"2")

;Click on Form Type

$o_individual_bpo_amount.click

;click on order type

$o_RadioButton=$oIE.document.getElementByValue("individual");

$o_RadioButton=$o_RadioButton+1

$o_RadioButton.click

<input type="Radio"

        name="ORDER_METHOD"

        value="upload" checked="Yes"

        onclick="this.form.individual_bpo_amount.style.backgroundColor ='cccccc'; this.form.individual_bpo_amount.disabled=true;">

        Upload Property Order File (CSV, XLS, DOC, TXT, XML)<br>

     

      <input type="radio"

        name="ORDER_METHOD"

        value="individual"

        onclick="this.form.individual_bpo_amount.style.backgroundColor ='ffffff';

        this.form.individual_bpo_amount.disabled=false;"

        >Manual Property Entry

        (If so, How Many

        <input disabled style="background-color: cccccc;"

        type="text" name="individual_bpo_amount"

        size="3" maxlength="3">)

<{POST_SNAPBACK}>

are you able to give a url to the page you're trying to work with?

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

I haven't read your last reply yet, but here is an example of working with a radiobutton. When you use _IEFormElementGetObjByName you can specify an index value when there is more than one object by that name.

This example opens the AutoIt forum search page and toggles the sortby radiobuttons.

#include <IE.au3>

$oIE = _IECreate()
_IENavigate($oIE, "http://www.autoitscript.com/forum/index.php?act=Search&f=")

$oFrom = _IEFormGetObjByName($oIE, "sForm")
$oRelevant = _IEFormElementGetObjByName($oFrom, "sortby", 0)
$oRecent = _IEFormElementGetObjByName($oFrom, "sortby", 1)

For $i = 1 to 5
    $oRelevant.checked = True
    Sleep(1000)
    $oRecent.checked = True
    Sleep(1000)
Next

Hopefully this gets you on your way.

Dale

Edit: fixed broken end code tag

Hello Guys,

First of all thank you for the great tool! I've worked with Segue before and I can tell you that AutoIt is as powerfull as Silk with no "extras" and a huge fee:)

I've been using IE.3au for automated testing of aour website and everything looks perfect so far, but radio and check boxes, Looks like i just hit the wall with those once, just cannot check the one i need since they all have the same names and i cannot pull the index for some reason. What i tried to do is get the first index by the box name and that just increment it to the one I actually need to click.

Thanx for your help

<{POST_SNAPBACK}>

Edited by DaleHohm

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

I haven't read your last reply yet, but here is an example of working with a radiobutton.  When you use _IEFormElementGetObjByName you  can specify an index value when there is more than one object by that name.

This example opens the AutoIt forum search page and toggles the sortby radiobuttons.

#include <IE.au3>

$oIE = _IECreate()
_IENavigate($oIE, "http://www.autoitscript.com/forum/index.php?act=Search&f=")

$oFrom = _IEFormGetObjByName($oIE, "sForm")
$oRelevant = _IEFormElementGetObjByName($oFrom, "sortby", 0)
$oRecent = _IEFormElementGetObjByName($oFrom, "sortby", 1)

For $i = 1 to 5
    $oRelevant.checked = True
    Sleep(1000)
    $oRecent.checked = True
    Sleep(1000)
Next

Hopefully this gets you on your way.

Dale

Edit: fixed broken end code tag

<{POST_SNAPBACK}>

Yep that works now!

Perfect!!!!

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
Sign in to follow this  
Followers 0