win32::IE Automation quick question

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Hello All,

I am looking to automate IE using this package and I am having trouble
with this particular point where I need to click a button. The page
source for the button has the following properties:

<div class="search_builder_submit"><div
id="view:_id1:_id204:showBody:_id206:searchSubmit" style="width:142px;
cursor:pointer; float:left"><img src="b_search.png"></div>

The point is there is no name, title or value options for which
generally the click button reacts to.. I have tried using the id but
get an error saying that the click option doesn't know what to do....
Any help would be appreciated !


Re: win32::IE Automation quick question

On Fri, 9 Jul 2010 08:12:44 -0700 (PDT), shankar_perl_rookie

Quoted text here. Click to load it

Is this a Perl problem? Have you checked the html?
I'm not a web designer so in my uneducated state
I'd say the id isin't being used. Have you tried to
put the html in a TryIt window at w3schools?

Being a rookie, I put together a test html,
try it out. Paste it into the left window here:
For any attribute that does not exist,
I think the variable (in JS) is assigned ''.
Add a value='' attribute then try it again.



<div class="search_builder_submit">
  <div id="view:_id1:_id204:showBody:_id206:searchSubmit"
    <div id="view:_id1:_id204:showBody:_id206:searchSubmit"
       value="Hello World!" >
<br />
Box: <input type="text" id="box" />
<br /><br />
Click the button to copy the content of
id = "view:_id1:_id204:showBody:_id206:searchSubmit"
to the Edit Box.
<br />
<button onclick=
   v = document.getElementById
   document.getElementById('box').value = v ? v : 'NO VALUE!';
Copy It!


Site Timeline