Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Descriptive programming variable issue
#1
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi All,

There are 3 Add buttons on my screen; so using Descriptive programming; If I write and execute the following line of code to click the 2nd Add button :

Code:
Browser("Test").Page("Test").Frame("Test").WebButton("name:=Add","index:=1").Click

Above line works perfectly well...

But when I write the following

Code:
strVariable= "name:=Add"",""index:=0"
--- including double - double quote in between as i need QTP to understand double quote literally

Browser("Test").Page("Test").Frame("Test").WebButton(strVariable).Click


It just does not work! - I have tried most of the the permutations and combinations with the quotes.
Any ideas on how to accomplish this?

Regards
Pooja
Reply
#2
Solved: 11 Years, 3 Months, 3 Weeks ago
can you try to add \ infront of first ".
Reply
#3
Solved: 11 Years, 3 Months, 3 Weeks ago
Nope, doesnt work with that ; tried with both:

Code:
strVariable= "name:=Add/"",""index:=0"
and

Code:
strVariable= "name:=Add/"",""/index:=0"

Thanks
Reply
#4
Solved: 11 Years, 3 Months, 3 Weeks ago
i am wonder with ""index:=0" its generally as "Propery:=value" means that "index is a property? can u chk it.

Reply
#5
Solved: 11 Years, 3 Months, 3 Weeks ago
Checked - its working when I put
Code:
Browser("Test").Page("Test").Frame("Test").WebButton("name:=Add","index:=1").Click

it works fine
only when i put it in a variable - then there's a problem.

Code:
strVariable= "name:=Add"",""index:=0"

so its not index related
Reply
#6
Solved: 11 Years, 3 Months, 3 Weeks ago
Just tried something and think I found the solution.
What worked for me was using 3 " at the beginning and the end of the String
example:
Code:
strVariable = """name:=queryall"",""type:=text"""
Browser("IP Startseite").Page("IP Startseite").WebEdit(strvariable).Set "def"

Hope it works for you too.

edit: forgot to use code tags, sry for that
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Dynamic descriptive Programming issue in Terminal Emulator cprasad 1 1,949 04-25-2019, 08:17 PM
Last Post: Ankur
  UFT Tool support with Descriptive programming laks 1 1,774 07-05-2018, 05:31 PM
Last Post: Ankur
  UFT Descriptive Programming objects not identified in a secure & private intranet env bugfinder2 1 1,828 06-07-2017, 01:41 PM
Last Post: Ankur
  UFT descriptive programming Browser("creationtime:=-1") not always working SOUMYADEEP 0 3,088 01-20-2017, 01:53 AM
Last Post: SOUMYADEEP
  Inserting variable values into Descriptive Programming Functions eske99 2 3,509 12-18-2015, 01:47 PM
Last Post: vinod123

Forum Jump:


Users browsing this thread: 4 Guest(s)