Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Data not getting entered in web edit box.
#1
Solved: 10 Years, 9 Months ago
Hi,

I have a login script which enters the username and password.
The problem is that after QTP enters the password(which it does after entering the username), the password in the password field vanishes when QTP executes the next line of code which is clicking on the Login button. Hence, am not able to login.

Please suggest a possible solution.
Reply
#2
Solved: 10 Years, 9 Months ago
Please post your script.
Reply
#3
Solved: 10 Years, 9 Months ago
Below is the script:

Code:
SystemUtil.Run "C:\Program Files\Internet Explorer\iexplore.exe","","H:\","open"
Browser("Browser").Page("Page").Sync
Browser("Browser").Navigate "https://www.ultimatix.net/"
datatable.Import  "H:\QTP_SServices\Ultimatix_Cred.xls"
datatable.SetCurrentRow(1)
'Retrieve the credentials
username=datatable(1,1)
password=datatable(2,1)
'Login
Browser("Ultimatix - Digitally").Page("Ultimatix - Digitally").WebEdit("USER").Set username

Browser("Ultimatix - Digitally").Page("Ultimatix - Digitally").WebEdit("PASSWORD").Set password

Browser("Ultimatix - Digitally").Page("Ultimatix - Digitally").WebButton("Login").Click

Browser("Home : Ultimatix - Digitally").Page("Home : Ultimatix - Digitally").Link("Logout").Click
Browser("Home : Ultimatix - Digitally").WinButton("Pop-up blocked. To see").Click
Browser("Home : Ultimatix - Digitally").Page("Home : Ultimatix - Digitally").Sync
Browser("Browser").Close

------------------------------------------------------------------
Reply
#4
Solved: 10 Years, 9 Months ago
Use "SetSecure" for passwords instead of "set"
Reply
#5
Solved: 10 Years, 9 Months ago
Hi,
I tried using SetSecure but the problem persists.
Actually I noticed one thing. The application I am testing is behaving in a different manner. Once I enter the username and password and then without clicking on the login button if I switch to a different tab of the browser and then come back to the original tab, the password field appears empty. Is there a possible solution by which I can overcome this problem..may be any code?
Reply
#6
Solved: 10 Years, 9 Months ago
I guess It may be as per design. As the password field is protected and supposed to be secured, the user is supposed to reenter the password in the above situation you mentioned.
Reply
#7
Solved: 10 Years, 9 Months ago
Can u try the below code.

Code:
Browser("Ultimatix - Digitally").Page("Ultimatix - Digitally").WebEdit("PASSWORD").object.value=<Password>

Regards,
Ankesh
Reply
#8
Solved: 10 Years, 9 Months ago
Hi Ankesh,

It worked. Thanks a lot.
Could you please tell me what is the reason this code worked.

Regards,
Anupam
Reply
#9
Solved: 10 Years, 9 Months ago
Sometime few field are readonly... you cant set values into those fields using the normal set option.

Object.value overwrites the readonly property and assigns a value to the object at runtime.

Regards,
Ankesh
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Not able to set value in application web edit box tanuj dewangan 4 3,471 07-29-2016, 03:58 PM
Last Post: harshadevadas
  Edit Recovery Scenario skegler 0 3,108 03-05-2014, 10:40 PM
Last Post: skegler
  Retrieving data from web table nsuresh316 1 2,959 03-03-2014, 08:29 AM
Last Post: basanth27
  Not able to edit existing scripts in QTP 11 prit deo 1 3,719 02-14-2014, 11:20 PM
Last Post: supputuri
  Link besides to any edit field prempujaripati 2 2,595 02-25-2013, 10:01 AM
Last Post: vinod123

Forum Jump:


Users browsing this thread: 1 Guest(s)