04-13-2011, 05:40 PM
Jay boss. Button will be disabled until webeleemnt is read. Anyways I got the solution and its working fine for me. am pasting the code snippet:-
Code:
set WshShell =CreateObject("WScript.Shell")
WshShell.SendKeys "{PGUP}"
Browser(objBrowser).Page(objPage).WebElement(objSpan).Click
sh=Browser(objBrowser).Page(objPage).WebElement(objSpan).Object.getAttribute("scrollHeight")
ch=Browser(objBrowser).Page(objPage).WebElement(objSpan).Object.getAttribute("clientHeight")
For i = o to sh step ch
WshShell.SendKeys "{PGDN}"
WshShell.SendKeys "^{END}" 'CTRL+END KEY
Next
Set objSpan = nothing
Set objBrowser = nothing
Set objPage = nothing