Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need code to compare wording in a web object pop-up with database
#1
Solved: 10 Years, 9 Months ago
Ankur, Saket/ other QTP Gurus,

I am planning to implement a QTP script that will click on a web object in my application under test, compare the wording in the pop-up that appears with the value in the relevant database field at the back end. If both are identical, show the test case as Passed, otherwise Fail he test case. QTP should connect to the database to do the above.

Thank you in advance for your help. You guys are awesome!
Reply
#2
Solved: 10 Years, 9 Months ago
Hi,
have you tried anything, in which part you are facing problem.
paste your peice of code here so that we can help in better way.
providing the code is never a good idea,we can provide you the guidelines and would like you to code which will help you to learn more Smile

1. click on the object, say - Browser().Page().webButton().click
2. Check the popup exists and get the text appeared there - Browser().Dialog().getvisibletext or
Browser().Dialog().static().GetROProperty("text")
3. Connect to database (search this forum there are lots of thread discussed on this earlier)
4. get the required table field value using query
now you can compare the both

hope it helps

Reply
#3
Solved: 10 Years, 9 Months ago
Thank you, Saket. That was very helpful. Appreciate it. I am going to test it later as soon as I find time from my current project.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Child Object Not able to identified in Web Menu Link noor 0 1,651 01-21-2018, 04:44 PM
Last Post: noor
  Not getting error pop up when replaying through batch amit25007 0 1,310 02-14-2017, 04:01 PM
Last Post: amit25007
  Compare second web list value according to the first web list value roselin6 1 2,646 10-07-2015, 09:14 PM
Last Post: supputuri
  webfile web object not identified at runtime in a java application saila123 1 2,655 02-11-2015, 08:23 PM
Last Post: Kirill
  Code not recognising Browser object as existing brigna 0 1,719 12-04-2014, 08:32 PM
Last Post: brigna

Forum Jump:


Users browsing this thread: 1 Guest(s)