Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Way to check if a table is visible
#1
Solved: 11 Years, 3 Months, 3 Weeks ago
I need a better way to check if a table is visible or not. Currently, if the WebTable is not visible, I open it. I determine which WebTable is needed by finding the "html id" but so far, my code always triggers.

My code is such:

Code:
NGNum = Browser("Wisdom").Page("Wisdom IA").Frame("parent").WebTable("innertext:=" & GroupName &".*", "visible:=True").WebTable("innertext:=" & "Document Type.*", "visible:=True").GetROProperty("html id")

If Not Browser("Wisdom").Page("Wisdom IA").Frame("parent").WebTable("innertext:=" & GroupName &".*").WebTable("innertext:=" & "Document Type.*", "visible:=True", "html id:=" & NGNum ).Exist(0) Then
                Browser("Wisdom").Page("Wisdom IA").Frame("parent").Link("name:=" & GroupName, "visible:=True").Click
Can anyone give me a better idea?

thx ;-)
Reply
#2
Solved: 11 Years, 3 Months, 3 Weeks ago
Code:
set desc=description.create
desc("micclass").value="WebTable"
desc("innertext").value="GroupName.*"
desc("visible").value="True"

If b().p().webtable(desc).exist then
Browser("Wisdom").Page("Wisdom IA").Frame("parent").Link("name:=" & GroupName, "visible:=True").Click
end if
Reply
#3
Solved: 11 Years, 3 Months, 3 Weeks ago
Rajpes,

You always give me such great ideas to try, including this time, thank you.

However, ;-) for whatever reason, even though I cant see the table, visible always will equal True. The code always is found to be True even if the table is hidden to the eye.

So I chatted with the developer on how they view and hide tables when we are looking at them.

His responce: "Look for the object with the name=“NestedGridx”. Check to see if there is a “style” property on that object. We are setting:

• style=”display:none;” – to hide the table
• style=”display:block;” – to show the table

If none of that exists, then QTP is probably providing an equivalent object/property with a different name – like a “visible:=True” which under the covers really is style=”display:block;”. All I can give you is what is actually happening in Image Access. From there, you’ll have to dig into QTP help to figure out how it exposes this."

I of course can see the Property of visble using QtP. I tried set to False then my code is always skipped, if True the code always run.

Have you had any similar issues to resolve before?

thx Rajpes
Reply
#4
Solved: 11 Years, 3 Months, 3 Weeks ago
check if any of these works
Code:
if  b().p().webtable().object.style="display:none;" then msgbox "hidden table"
if  b().p().webtable().object.currentstyle="display:none;"then msgbox "hidden table"
Reply
#5
Solved: 11 Years, 3 Months, 3 Weeks ago
Thx Rajpes

With a little more resarch of your solution, i beleive i figured it out;

If Browser().Page().Frame().WebTable( "html id:=" & NGNum ).object.style.display = "none" Then

thx, ur the best
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [UFT 12.52/VBScript] Test object exist, is visible and enabled before take an action sparkwanted 0 3,650 02-07-2017, 12:28 AM
Last Post: sparkwanted
Exclamation Retrieve the complete height and width of a browser beyond the visible part as wel learnQtptips 0 2,114 05-22-2013, 09:36 AM
Last Post: learnQtptips
  Disabled Webelement is showing up as Visible =True in GUI Spy Shwethareddy 3 3,854 11-07-2012, 02:45 PM
Last Post: Ankesh
Question Get total links visible on a webpage Sanjay_DP 5 6,465 02-16-2012, 10:30 PM
Last Post: Parke
  How to check for duplicate rows/items in table? Aestival 10 13,908 02-25-2011, 10:31 AM
Last Post: chandrashekhar_g

Forum Jump:


Users browsing this thread: 2 Guest(s)