win32::IE Automation quick question

  • Thread starter shankar_perl_rookie
  • Start date
S

shankar_perl_rookie

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 !

Regards,
 
S

sln

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 !

Regards,

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:
http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_onclick
For any attribute that does not exist,
I think the variable (in JS) is assigned ''.
Add a value='' attribute then try it again.

-sln

----------------
<html>
<body>

<div class="search_builder_submit">
<div id="view:_id1:_id204:showBody:_id206:searchSubmit"
</div>
<!--
<div id="view:_id1:_id204:showBody:_id206:searchSubmit"
value="Hello World!" >
</div>
-->
</div>
<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
('view:_id1:_id204:showBody:_id206:searchSubmit').value;
document.getElementById('box').value = v ? v : 'NO VALUE!';
">
Copy It!
</button>

</body>
</html>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,214
Messages
2,571,112
Members
47,705
Latest member
noname22

Latest Threads

Top