Micro Focus QTP (UFT) Forums
GetVisibleText - 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: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: GetVisibleText (/Thread-GetVisibleText)



GetVisibleText - jsknight1969 - 10-02-2009

Any thought to why I would get different values from
Code:
.WinObject("Internet Explorer_Server").GetVisibleText()

I tried registering the application as a browser. That did not change anything.

to the best of my knowledge this is a VB IE control on a WinForm.

here are my results...slightly modified to hide some critical data.

first:
"ACCOUNT OPEN MORE THAN 1 YEAR
Account:0000XXXXXX Type: BSC Commercial
Name: NAME OF MY BUSINESS
Ledger: 88.91  Status: OP
Hold Amt: 0.00   Privilege Pay: YES
Markup: 10.00   SPI: NO
Available: 78.91  Alerts: NO
NSF Today: 0   Stop Pays: NO
Charge Backs: 0   PosiPay: NO
Officer:   Key: NO
Opened: 12/07/2007   Avg Coll: --83.91
Deposits: --88.91  Loans:     0.00"

What is wrong is ledger value should be --88.91, avaliable should be --78.91, Charge Backs should be Charge-Backs....

second run:
"ACCOUNT OPEN MORE THAN 1 YEAR
Account:0000XXXXXX Type: BSC Commercial
Name: NAME OF MY BUSINESS
Ledger: 88.9188.91  Status: OP
Hold Amt: 0.00   Privilege Pay: YES
Markup: 10.00   SPI: NO
Available:   Alerts: NO
NSF Today: 0   Stop Pays: NO
Charge Backs: 0   PosiPay: NO
Officer:   Key: NO
Opened: 12/07/2007   Avg Coll: --83.91
Deposits: 88.91  Loans:     0.00"

What is wrong: Ledger value, Available is missing, Charge backs again, and deposits should be --88.91

third run:
"ACCOUNT OPEN MORE THAN 1 YEAR
Account:0000XXXXXX Type: BSC Commercial
Name: NAME OF MY BUSINESS
Ledger: 88.91  Status: OP
Hold Amt: 0.00   Privilege Pay: YES
Markup: 10.00   SPI: NO
Available: 78.91  Alerts: NO
NSF Today: 0   Stop Pays: NO
0   PosiPay: NO
Officer:   Key: NO
Opened: 12/07/2007   Avg Coll: 83.91--83.91
Deposits: --88.91  Loans:     0.00"

What is wrong: Ledger value, Available should be --78.91, Charge-Backs is MISSING!!!!, Avg Coll value.

I did not run the script 3 times. I used the debug command window to issue the GetVisibleText() into my variable then grabbed the value from the varibles tab.

It seems obvious that QTP doesn't like "-". When I run the test with a positive value result, it works except for the "Charge-Back" errors because that text string is the same on all outputs.

I tried using "GetROProperty("text")", that is empty.

Please any thoughts?


RE: GetVisibleText - Saket - 10-03-2009

are you able to spy on the object? can you attach the snapshot og your spy?


RE: GetVisibleText - jsknight1969 - 10-06-2009

I hope this is what you were looking for. I'm still new to QTP and the lingo, so let me know if you wanted something else.

Thanks.

[attachment=288]