The following warnings occurred:
Warning [2] Undefined array key "extra" - Line: 100 - File: inc/plugins/google_seo/url.php PHP 8.2.18 (Linux)
File Line Function
/inc/plugins/google_seo/url.php 100 errorHandler->error
/inc/plugins/google_seo.php 317 require_once
/inc/class_plugins.php 38 require_once
/inc/init.php 239 pluginSystem->load
/global.php 20 require_once
/printthread.php 16 require_once
Warning [2] Undefined variable $location - Line: 1250 - File: inc/plugins/google_seo/url.php PHP 8.2.18 (Linux)
File Line Function
/inc/plugins/google_seo/url.php 1250 errorHandler->error
/inc/plugins/google_seo/url.php 174 google_seo_url_hook
/inc/plugins/google_seo.php 317 require_once
/inc/class_plugins.php 38 require_once
/inc/init.php 239 pluginSystem->load
/global.php 20 require_once
/printthread.php 16 require_once
Warning [2] Undefined array key "lockoutexpiry" - Line: 94 - File: global.php PHP 8.2.18 (Linux)
File Line Function
/global.php 94 errorHandler->error
/printthread.php 16 require_once
Warning [2] Trying to access array offset on value of type null - Line: 546 - File: inc/class_parser.php PHP 8.2.18 (Linux)
File Line Function
/inc/class_parser.php 546 errorHandler->error
/inc/class_parser.php 580 postParser->cache_smilies
/inc/class_parser.php 195 postParser->parse_smilies
/inc/plugins/bam.php 329 postParser->parse_message
/inc/class_plugins.php 142 bam_announcements
/global.php 100 pluginSystem->run_hooks
/printthread.php 16 require_once
Warning [2] Trying to access array offset on value of type null - Line: 546 - File: inc/class_parser.php PHP 8.2.18 (Linux)
File Line Function
/inc/class_parser.php 546 errorHandler->error
/inc/class_parser.php 580 postParser->cache_smilies
/inc/class_parser.php 195 postParser->parse_smilies
/inc/plugins/bam.php 329 postParser->parse_message
/inc/class_plugins.php 142 bam_announcements
/global.php 100 pluginSystem->run_hooks
/printthread.php 16 require_once
Warning [2] Trying to access array offset on value of type null - Line: 546 - File: inc/class_parser.php PHP 8.2.18 (Linux)
File Line Function
/inc/class_parser.php 546 errorHandler->error
/inc/class_parser.php 580 postParser->cache_smilies
/inc/class_parser.php 195 postParser->parse_smilies
/inc/plugins/bam.php 329 postParser->parse_message
/inc/class_plugins.php 142 bam_announcements
/global.php 100 pluginSystem->run_hooks
/printthread.php 16 require_once
Warning [2] Trying to access array offset on value of type null - Line: 546 - File: inc/class_parser.php PHP 8.2.18 (Linux)
File Line Function
/inc/class_parser.php 546 errorHandler->error
/inc/class_parser.php 580 postParser->cache_smilies
/inc/class_parser.php 195 postParser->parse_smilies
/inc/plugins/bam.php 329 postParser->parse_message
/inc/class_plugins.php 142 bam_announcements
/global.php 100 pluginSystem->run_hooks
/printthread.php 16 require_once
Warning [2] Trying to access array offset on value of type null - Line: 546 - File: inc/class_parser.php PHP 8.2.18 (Linux)
File Line Function
/inc/class_parser.php 546 errorHandler->error
/inc/class_parser.php 580 postParser->cache_smilies
/inc/class_parser.php 195 postParser->parse_smilies
/inc/plugins/bam.php 329 postParser->parse_message
/inc/class_plugins.php 142 bam_announcements
/global.php 100 pluginSystem->run_hooks
/printthread.php 16 require_once
Warning [2] Trying to access array offset on value of type null - Line: 546 - File: inc/class_parser.php PHP 8.2.18 (Linux)
File Line Function
/inc/class_parser.php 546 errorHandler->error
/inc/class_parser.php 580 postParser->cache_smilies
/inc/class_parser.php 195 postParser->parse_smilies
/inc/plugins/bam.php 329 postParser->parse_message
/inc/class_plugins.php 142 bam_announcements
/global.php 100 pluginSystem->run_hooks
/printthread.php 16 require_once
Warning [2] Trying to access array offset on value of type null - Line: 546 - File: inc/class_parser.php PHP 8.2.18 (Linux)
File Line Function
/inc/class_parser.php 546 errorHandler->error
/inc/class_parser.php 580 postParser->cache_smilies
/inc/class_parser.php 195 postParser->parse_smilies
/inc/plugins/bam.php 329 postParser->parse_message
/inc/class_plugins.php 142 bam_announcements
/global.php 100 pluginSystem->run_hooks
/printthread.php 16 require_once
Warning [2] Trying to access array offset on value of type null - Line: 546 - File: inc/class_parser.php PHP 8.2.18 (Linux)
File Line Function
/inc/class_parser.php 546 errorHandler->error
/inc/class_parser.php 580 postParser->cache_smilies
/inc/class_parser.php 195 postParser->parse_smilies
/inc/plugins/bam.php 329 postParser->parse_message
/inc/class_plugins.php 142 bam_announcements
/global.php 100 pluginSystem->run_hooks
/printthread.php 16 require_once
Warning [2] Trying to access array offset on value of type null - Line: 546 - File: inc/class_parser.php PHP 8.2.18 (Linux)
File Line Function
/inc/class_parser.php 546 errorHandler->error
/inc/class_parser.php 580 postParser->cache_smilies
/inc/class_parser.php 195 postParser->parse_smilies
/inc/plugins/bam.php 329 postParser->parse_message
/inc/class_plugins.php 142 bam_announcements
/global.php 100 pluginSystem->run_hooks
/printthread.php 16 require_once
Warning [2] Undefined variable $announcements - Line: 2 - File: inc/plugins/bam.php(356) : eval()'d code PHP 8.2.18 (Linux)
File Line Function
/inc/plugins/bam.php(356) : eval()'d code 2 errorHandler->error
/inc/plugins/bam.php 356 eval
/inc/class_plugins.php 142 bam_announcements
/global.php 100 pluginSystem->run_hooks
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 201 - File: inc/plugins/gomobile.php PHP 8.2.18 (Linux)
File Line Function
/inc/plugins/gomobile.php 201 errorHandler->error
/inc/class_plugins.php 142 gomobile_forcetheme
/global.php 100 pluginSystem->run_hooks
/printthread.php 16 require_once
Warning [2] Undefined array key "gomobile" - Line: 214 - File: inc/plugins/gomobile.php PHP 8.2.18 (Linux)
File Line Function
/inc/plugins/gomobile.php 214 errorHandler->error
/inc/class_plugins.php 142 gomobile_forcetheme
/global.php 100 pluginSystem->run_hooks
/printthread.php 16 require_once
Warning [2] Undefined array key "gomobile" - Line: 275 - File: inc/plugins/gomobile.php PHP 8.2.18 (Linux)
File Line Function
/inc/plugins/gomobile.php 275 errorHandler->error
/inc/class_plugins.php 142 gomobile_forcetheme
/global.php 100 pluginSystem->run_hooks
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 280 - File: inc/plugins/gomobile.php PHP 8.2.18 (Linux)
File Line Function
/inc/plugins/gomobile.php 280 errorHandler->error
/inc/class_plugins.php 142 gomobile_forcetheme
/global.php 100 pluginSystem->run_hooks
/printthread.php 16 require_once
Warning [2] Undefined array key "fid" - Line: 2275 - File: inc/plugins/mysupport.php PHP 8.2.18 (Linux)
File Line Function
/inc/plugins/mysupport.php 2275 errorHandler->error
/inc/class_plugins.php 142 mysupport_notices
/global.php 100 pluginSystem->run_hooks
/printthread.php 16 require_once
Warning [2] Undefined array key "fid" - Line: 2277 - File: inc/plugins/mysupport.php PHP 8.2.18 (Linux)
File Line Function
/inc/plugins/mysupport.php 2277 errorHandler->error
/inc/class_plugins.php 142 mysupport_notices
/global.php 100 pluginSystem->run_hooks
/printthread.php 16 require_once
Warning [2] Undefined array key "lockoutexpiry" - Line: 573 - File: global.php PHP 8.2.18 (Linux)
File Line Function
/global.php 573 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $can_access_moderationqueue - Line: 749 - File: global.php PHP 8.2.18 (Linux)
File Line Function
/global.php 749 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 889 - File: global.php PHP 8.2.18 (Linux)
File Line Function
/global.php 889 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 889 - File: global.php PHP 8.2.18 (Linux)
File Line Function
/global.php 889 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $metadescription - Line: 2 - File: global.php(953) : eval()'d code PHP 8.2.18 (Linux)
File Line Function
/global.php(953) : eval()'d code 2 errorHandler->error
/global.php 953 eval
/printthread.php 16 require_once
Warning [2] Undefined variable $metakeywords - Line: 3 - File: global.php(953) : eval()'d code PHP 8.2.18 (Linux)
File Line Function
/global.php(953) : eval()'d code 3 errorHandler->error
/global.php 953 eval
/printthread.php 16 require_once
Warning [2] Undefined variable $unreadreports - Line: 54 - File: global.php(956) : eval()'d code PHP 8.2.18 (Linux)
File Line Function
/global.php(956) : eval()'d code 54 errorHandler->error
/global.php 956 eval
/printthread.php 16 require_once
Warning [2] Undefined variable $awaitingusers - Line: 56 - File: global.php(956) : eval()'d code PHP 8.2.18 (Linux)
File Line Function
/global.php(956) : eval()'d code 56 errorHandler->error
/global.php 956 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 298 - File: inc/plugins/gomobile.php PHP 8.2.18 (Linux)
File Line Function
/inc/plugins/gomobile.php 298 errorHandler->error
/inc/class_plugins.php 142 gomobile_forcefooter
/global.php 1250 pluginSystem->run_hooks
/printthread.php 16 require_once
Warning [2] Undefined array key 6563 - Line: 833 - File: inc/plugins/google_seo/url.php PHP 8.2.18 (Linux)
File Line Function
/inc/plugins/google_seo/url.php 833 errorHandler->error
/inc/plugins/google_seo/url.php 1412 google_seo_url_cache
/inc/functions.php 6093 google_seo_url_thread
/printthread.php 124 get_thread_link
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.2.18 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.2.18 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key 20485 - Line: 833 - File: inc/plugins/google_seo/url.php PHP 8.2.18 (Linux)
File Line Function
/inc/plugins/google_seo/url.php 833 errorHandler->error
/inc/plugins/google_seo/url.php 1347 google_seo_url_cache
/inc/functions.php 5978 google_seo_url_profile
/inc/functions.php 6046 get_profile_link
/printthread.php 177 build_profile_link
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.2.18 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.2.18 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key 12085 - Line: 833 - File: inc/plugins/google_seo/url.php PHP 8.2.18 (Linux)
File Line Function
/inc/plugins/google_seo/url.php 833 errorHandler->error
/inc/plugins/google_seo/url.php 1347 google_seo_url_cache
/inc/functions.php 5978 google_seo_url_profile
/inc/functions.php 6046 get_profile_link
/printthread.php 177 build_profile_link
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.2.18 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.2.18 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.2.18 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.2.18 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.2.18 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.2.18 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key 10257 - Line: 833 - File: inc/plugins/google_seo/url.php PHP 8.2.18 (Linux)
File Line Function
/inc/plugins/google_seo/url.php 833 errorHandler->error
/inc/plugins/google_seo/url.php 1347 google_seo_url_cache
/inc/functions.php 5978 google_seo_url_profile
/inc/functions.php 6046 get_profile_link
/printthread.php 177 build_profile_link
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.2.18 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.2.18 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Micro Focus QTP (UFT) Forums
Trying to do this .exist but it is always TRUE - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Trying to do this .exist but it is always TRUE (/Thread-Trying-to-do-this-exist-but-it-is-always-TRUE)



Trying to do this .exist but it is always TRUE - chong67 - 07-05-2012

I have the following code below.

It work as I dont want to use the Wait statement anymore.

The problem is that I have to cut and paste these code into everyone of my Test Flow step because the .WedEdit variable will change on each of the flow.

Is there a way to cut down on the repetitive step?

===============

Code:
blnDone=Browser(oDeltaBrowser).Page(oDeltaPage).WebEdit("name:=departureCity\[0\]", "html id:=departureCity_0").Exist
counter=1

While Not blnDone
        Wait (2)
        blnDone=Browser(oDeltaBrowser).Page(oDeltaPage).WebEdit("name:=departureCity\[0\]", "html id:=departureCity_0").Exist
        counter=counter+1
        If counter=10 then
            blnDone=True
        End if
Wend



RE: How to make '.exist' condition as global? - Ankesh - 07-05-2012

try using a function and pass the webedit properties as parameters.

Regards,
Ankesh


RE: How to make '.exist' condition as global? - chong67 - 07-06-2012

Ankesh,

You mean using f(x) ? I get it.

I got another problem.

I have done msgbox(blnDone) to see do my debugging.

On some of the pages, the page have not loaded and my my blnDone is TRUE and hence .exist is true and code did not wait at all! I am very confused!

I am trying to avoid using Wait statement.

Do you have any idea?


RE: Trying to do this .exist but it is always TRUE - chong67 - 07-07-2012

I have the following snippit of code here.

Code:
Do While Browser(oDeltaBrowser).Page(oDeltaPage).WebElement("html id:=intro_text", "outertext:=AWAY WE GO. ARRIVING AT YOUR FLIGHTS SOON  ").Exist
     Wait(2)
Loop
Bascially it says is that if the browser is still on THIS SAME page, keep waiting for every 2 sec until the NEXT PAGE is loaded.

NOW the NEXT page is loaded and it doesnt have this property anymore, YET it is still STUCK IN THIS LOOP.

I just dont undestand. How should I debug this? Any ideas?


RE: Trying to do this .exist but it is always TRUE - vIns - 07-07-2012

Hi,

.Exist method will return True even if the object is hidden. ie, object is still there but it is not visible.

So, just check if the object is visible or not.
Code:
If Browser().Page().WebEdit().GetRoProperty("x") = 0 AND Browser().Page().WebEdit().GetRoProperty("y") = 0 Then
          Msgbox "obj not visible"
Else
         Msgbox "obj visible"
End If

And you might have to wait till the obj is loaded fully in some cases.
Code:
Browser().Page().WebEdit().WaitProperty "visible", True, 10000
10000 --> time in milli seconds
It is same like Wait method but if the obj is visible in 3 seconds, it will exit from the statement. It will not wait for 10 seconds which is good[/php]


RE: Trying to do this .exist but it is always TRUE - chong67 - 07-09-2012

VIns, Thank you for giving me this hint about the object is visible or not! I turn it around and troubleshoot and I use what you post to my advantage and guess what, it works!

But I am very very confused!

'This code works!

Code:
Dim Done, counter

Done=False

While Not Done
        Wait (2)
        If Browser("name:=Delta - Book a flight").Page("title:=Delta - Book a flight").WebEdit("name:=departureCity\[0\]", "html id:=departureCity\[0\]").GetRoProperty("x") = 0 AND Browser("name:=Delta - Book a flight").Page("title:=Delta - Book a flight").WebEdit("name:=departureCity\[0\]", "html id:=departureCity\[0\]").GetRoProperty("y") = 0 Then
                  'Msgbox "obj not visible"
        Else
                 'Msgbox "obj visible"
                 Done=True
        End If
       counter=counter+1
       If counter=30 Then
           Done=True
       End If

Wend

'This code did not work for me AND I WANT TO USE THIS ONE! Please help

Code:
Do While Browser("name:=Delta - Book a flight").Page("title:=Delta - Book a flight").WebEdit("name:=departureCity\[0\]", "html id:=departureCity\[0\]").Exist(0)
   Wait(2)
Loop

'This code did not work for me

Code:
Browser("name:=Delta - Book a flight").Page("title:=Delta - Book a flight").WebEdit("name:=departureCity\[0\]", "html id:=departureCity\[0\]").WaitProperty "visible", True, 59000

I want to use the middle code. (See my comment) I cant figure out why.

Any ideas?