04-24-2014, 06:37 PM
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:
But once done like this, the information is entered correctly:
Can anyone explain what is the issue here?
Regards, pistaa
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