Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Same command needs to be performed twice to actually perform it
#1
Solved: 10 Years, 3 Weeks ago
Hi!

I tried to find similar issues from the forum and via google, but didn't find any.

Anyways I'm a beginner with QTP and I need to fix some scripts that have been created by someone else.

The scripts are testing a web application (basically entering information to web forms using the QTP datatable).
I ran into two scripts where seems to be the same issue; for some reason the data is not entered on a specific field. I checked that the field name etc. is not changed, and if I simply add the same command on the script again the problem is solved.

There is an If expression before the command, if that makes any difference.

So, basically this doesn't enter the value in the field:
Code:
If DataTable("p_CarOwner", dtLocalSheet) = "OTHER" Then
Browser("Browser").Page("Form").WebEdit("ctl00$ContentPlaceHolderEForms_11").Set DataTable("p_OtherOwner", dtLocalSheet)
End If

But once done like this, the information is entered correctly:
Code:
If DataTable("p_CarOwner", dtLocalSheet) = "OTHER" Then
Browser("Browser").Page("Form").WebEdit("ctl00$ContentPlaceHolderEForms_11").Set DataTable("p_OtherOwner", dtLocalSheet)
Browser("Browser").Page("Form").WebEdit("ctl00$ContentPlaceHolderEForms_11").Set DataTable("p_OtherOwner", dtLocalSheet)
End If

Can anyone explain what is the issue here?

Regards, pistaa
Reply


Messages In This Thread
Same command needs to be performed twice to actually perform it - by pistaa - 04-24-2014, 06:37 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Telnet command not recognized Sanjana1987 1 1,860 09-20-2017, 03:16 PM
Last Post: Ankur
  WinListView set item command Shahino007 0 2,540 10-06-2015, 03:57 PM
Last Post: Shahino007
  Capturing the exact time when an operation is performed. Dilliz 2 2,848 01-09-2014, 03:30 PM
Last Post: Dilliz
  Perform some functions whenever QTP Stop button is pressed smartkarthi 2 2,959 08-22-2013, 11:43 AM
Last Post: smartkarthi
Exclamation Getting run time error while executing the QTP script in command prompt. vishruth143 1 5,477 07-15-2013, 05:41 PM
Last Post: vinod123

Forum Jump:


Users browsing this thread: 1 Guest(s)