Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Checking Some Fields in a website
#1
Solved: 11 Years, 3 Months, 1 Week ago
Hi,

I am automating a website and there I need to check whether some specific fields (WebEdit,WebList,WebCheckBox) appear when a link is clicked and all disappear when the link is clicked again.

I hav added all the fields to the Object Repository.I hav written the following code to check the link works properly.
Code:
Browser("").Page("").Frame("").Link("").Click
Browser("").Page("").Frame("").WebEdit("").CheckProperty visible,True,20000

Browser("").Page("").Frame("").Link("").Click
Browser("").Page("").Frame("").WebEdit("").CheckProperty visible,False,20000


The problem in doing so is when I am clicking the link all fields are visible and property "visible" has value "1",but while clicking the link again all the fields are getting disappeared but the 2nd checkpoint is failing because the "visible" property still retains value "1"

I think Descriptive Programming is the only way it can be done with...

Can anybody suggest me something on that ?
Reply
#2
Solved: 11 Years, 3 Months, 1 Week ago
Try using:
Code:
if lcase(Browser("").Page("").Frame("").WebEdit("").Object.style.display) <> "none" then
   'object is visible
else
   'object is hidden
end if

Since those objects are probably being hidden using javascript, it is the style that is changing not the tag property of visible.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to check empty fields? ripchin 1 3,398 05-10-2014, 01:18 PM
Last Post: Ankur
  How to mask the particular read only mode fields while capturing screenshot in QTP kalaivanan123 2 3,507 03-18-2014, 11:31 AM
Last Post: basanth27
  Payment details fields are getting flushed vimalkamothi 4 3,407 01-04-2014, 11:09 AM
Last Post: vinod123
  Get value from table out of a website Flooole 9 5,492 10-10-2013, 02:07 PM
Last Post: Flooole
  spell checking of web objects kriday 3 3,958 07-05-2013, 01:37 PM
Last Post: Staff

Forum Jump:


Users browsing this thread: 1 Guest(s)