Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Setting a html path to a variable
#1
Solved: 11 Years, 3 Months ago Shy 
I have two pathways that I am trying to use when searching for a dialog box

Code:
If Browser("Preferences").Page("Preferences").WebElement("close_window2").Exist(0) then
    BrowserPath = Browser("Preferences").Page("Preferences")
Else
    If Browser("name:=Preferences","CreationTime:=1" ).Page("title:=Preferences").WebElement("html id:=btnClose").Exist(0) Then
        BrowserPath = Browser("name:=Preferences","CreationTime:=1" ).Page("title:=Preferences")
    Else
                Msgbox "Browser Path Not Found"
    End If
End If

With BrowserPath
……

This is of course not working. Can I set a variable name to a path as I have indicated above (thus to use in a With statement)?
Reply
#2
Solved: 11 Years, 3 Months ago
Code:
[b]set[/b] BrowserPath = Browser("Preferences").Page("Preferences")
Reply
#3
Solved: 11 Years, 3 Months ago
Thx, after all of my digging I finally found out why my Browser("Preferences").Page("Preferences") was not working, lol, here it comes; My Local OR had a duplicate Browser("Preferences").Page("Preferences") ... which was different than in my own IA.tsr file. Thus the Local OR was being used while I was changing my IA or.

Arggggggghhhhhhh!

I ussually flush/delete/etc my local OR, my bad.

lol

thx everyone.

Lor
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  how to get relative path by using testdir environment variable Sathyaprasad 1 1,908 11-30-2017, 02:21 AM
Last Post: supputuri
  Customized HTML reports in QTP azeem 11 49,342 12-31-2016, 02:57 PM
Last Post: chevronneraji
  Path of Flight reservation Window is not recorded in HP UFT 12.52 version mailtokopalverma@gmail.com 1 2,674 04-01-2016, 05:34 PM
Last Post: vinod123
  [UFT] Get text into DIV through HTML tag robertosalemi 2 5,494 03-29-2016, 09:43 PM
Last Post: robertosalemi
  X path Identification vasavi.vasavi 1 2,923 07-29-2015, 10:44 AM
Last Post: kbhargava505

Forum Jump:


Users browsing this thread: 1 Guest(s)