• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Trouble - IE Automation Scenario (iframe)

Karthik.J

New Member
I need a vba code to click on a web page label text (Log an Issue) which has been placed inside an iframe, the sample html code is given below,

<iframe name="VF304274040_1502270092884IF_1" title="Browse Categories" id="VF304274040_1502270092884IF_1" src="javascript:"<HTML></HTML>"" frameBorder="0" scrolling="auto" style="background-color: transparent; width: 100%; height: 100%; top: 0px; left: 0px;" allowTransparency="allowtransparency" onload="F(1,304274040).ol()" arviewbordercolor="null">
<head>XXXX
<body>XXXX<div id XXXX>.............
<div id XXXX>.............
<div class="categoryTitleLink">
<label class="cursor bold category_title" id="cat-title IDHAA5V0GQBL2AN3HRTMFOSP0OLB90" level="0" category="true" categoryname="Log+an+Issue" descr="#IDHAA5V0GQBL2AN3HRTMFOSP0OLB90">
....Text - Log an Issue
</body>
</head>

I've tried the below vba code to parse through the iframe and it's div class inner texts and found the "Log an Issue" element, but i couldn't trigger it.

Code:
doc1 = IE.document.frames(1).Name
ForEach div In IE.document.frames(doc1).document.getElementsByTagName("div")
class_obj = div.innerText
If class_obj ="Log an Issue" Then  ' the text was found by this loop
div.parentElement.Click ' this doesn't works (nothing happening)
End If
Next div
 
Last edited:
Hi ,

Please mention the URL that is to be used for the code.

Narayan
Thanks for the reply,
Multiple IE navigation (url as well as some of the web page div id elements) has been done before this code, got stucked when try to navigate(trigger) this element.
 
Back
Top