From: shankar_perl_rookie on 9 Jul 2010 11:12 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,
From: sln on 9 Jul 2010 14:15 On Fri, 9 Jul 2010 08:12:44 -0700 (PDT), shankar_perl_rookie <mulshankar(a)gmail.com> wrote: >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>
|
Pages: 1 Prev: FAQ 3.30 What's MakeMaker? Next: FAQ 7.26 How can I find out my current or calling package? |