Sign in to follow this  
Followers 0
anom_admin

_IEGetObjById issue within a table

5 posts in this topic

Hello everyone,

I am trying to get the value of id="wlan0_dot11_mode, I simply wanna print it out on a GUI but I'm starting with a ConsoleWrite(id) to make sure I am able to gets it's id.

No matter what I tried, I can't same to get it's value.

Here's the HTML CODE( It's from a dlink dir 825 configuration page, extracted the code with firebug) :

<div id="box_header">
<div class="box">

<h2>
<table width="525" cellspacing="1" cellpadding="1" border="0">
<tbody>

<tr>

<tr>

<tr>
<tr>


<td class="duple">

<td width="340">


<select id="dot11_mode" onclick="show_chan_width();" name="dot11_mode">


<option value="11b" default="false">

<option value="11g" default="false">

<option value="11n" default="false">

<option value="11bg" default="false">

<option value="11gn" default="false">

<option value="11bgn" default="true">
</select>

<input id="wlan0_dot11_mode" type="hidden" value="11bgn" name="wlan0_dot11_mode" default="11bgn">
</td>[code]
<div id="box_header">
<div class="box">
<h2>
<table width="525" cellspacing="1" cellpadding="1" border="0">
<tbody>
<tr>
<tr>
<tr>
<tr>
<td class="duple">
<td width="340">
<select id="dot11_mode" onclick="show_chan_width();" name="dot11_mode">
<option value="11b" default="false">
<option value="11g" default="false">
<option value="11n" default="false">
<option value="11bg" default="false">
<option value="11gn" default="false">
<option value="11bgn" default="true">
</select>
<input id="wlan0_dot11_mode" type="hidden" value="11bgn" name="wlan0_dot11_mode" default="11bgn">
</td>

Here's my AutoIT :

Func StartTestClick()

;Creates Dlink page and logs in
$oIE = _IECreate("http://192.168.0.1")
$password = _IEGetObjByName($oIE, "log_pass")
_IEPropertySet($password, 'innerText',"")
$button = _IEGetObjById ($oIE, "login")
_IEAction ($button, "click")


; Navigates to config page
_IENavigate($oIE,"http://192.168.0.1/wireless.asp")

sleep(1000)
; _IELoadWait($oIE) I'm trying both just in case it was a loading issue,
$ConnexionType = _IEGetObjById($oIE, "wlan0_dot11_mode")
$ConnexionTypeName = _IEGetObjByName($oIE, "wlan0_dot11_mode")
ConsoleWrite($ConnexionTypeName)
ConsoleWrite($ConnexionType)

ConsoleWrite( _IEGetObjById($oIE, "dot11_mode"))
ConsoleWrite ("ConnextiontypeTestmessage")

Any help is greatly appreciated, the console doesn't return me any error, it prints out my ConnextiontypeTestmessage.Seems like I can't grab the value of those Id.

Thank you in advance :D

Share this post


Link to post
Share on other sites



#include <IE.au3>
StartTestClick()
Func StartTestClick()
;Creates Dlink page and logs in
$oIE = _IECreate("http://192.168.0.1")
$password = _IEGetObjByName($oIE, "log_pass")
_IEPropertySet($password, 'innerText',"")
$button = _IEGetObjById ($oIE, "login")
_IEAction ($button, "click")

; Navigates to config page
_IENavigate($oIE,"http://192.168.0.1/wireless.asp")
sleep(1000)
; _IELoadWait($oIE) I'm trying both just in case it was a loading issue,
$ConnexionType = _IEGetObjById($oIE, "wlan0_dot11_mode")
$ConnexionTypeName = _IEGetObjByName($oIE, "wlan0_dot11_mode")
ConsoleWrite(_IEPropertyGet($ConnexionTypeName,"innerText"))
ConsoleWrite(_IEPropertyGet($ConnexionType, "innerText"))
ConsoleWrite ("ConnextiontypeTestmessage")
EndFunc

Change the 2ond parametre of _IEPropertyGet according to what you want to get. See help files for more infos


I feel nothing.It feels great.

Share this post


Link to post
Share on other sites

Thank you for your reponse!

I don't quite understand yet the property, after reading the help files, I still figure out what I should change innertext to.

I will try to read some more about propertyget, maybe I'll figure it out :sweating:

Share this post


Link to post
Share on other sites

What you want to get? If you can't figure it out just let me know. Maybe I could help


I feel nothing.It feels great.

Share this post


Link to post
Share on other sites

I've finally solved it yesterday with my original code but using a .value at the end,

Thank you!

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