Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Web Element object
#1
Solved: 11 Years, 3 Months, 4 Weeks ago Question 
We have an web element object which looks like text area. We have an Agree button which is disbaled. This button will be enabled only when in web element object users scrolls till end of text. There are scroll bars inside this web element, but they are part of web element only. How can i click or reach the to the last text in this web element o that Agree button will be enabled. Any help will be appreciated. Please note am working with descriptive programming approach.

Thanks.
Reply
#2
Solved: 11 Years, 3 Months, 4 Weeks ago
why dont you directly write the code for agree button click..
Reply
#3
Solved: 11 Years, 3 Months, 4 Weeks ago
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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Child Object Not able to identified in Web Menu Link noor 0 1,862 01-21-2018, 04:44 PM
Last Post: noor
  Unable to select WebFile element upadhyay40 5 7,914 06-28-2016, 04:38 PM
Last Post: aakash
  webfile web object not identified at runtime in a java application saila123 1 2,821 02-11-2015, 08:23 PM
Last Post: Kirill
  QTP identifying WebList as WebEdit and an Element passion77 3 8,444 01-27-2014, 10:21 PM
Last Post: supputuri
Exclamation How to validate color of image object in a web page qtplearner88 9 9,246 06-14-2012, 06:34 PM
Last Post: Shridevi.Salagare

Forum Jump:


Users browsing this thread: 1 Guest(s)