Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Enter the login details
#1
Solved: 11 Years, 4 Months, 3 Weeks ago Exclamation 
Hi..

How to enter login details using descriptive programming?

Login page contains E-mail and Password with Login button...

I used 2kinds of code..Both throws an error

One,
Code:
Dim webobj
set webobj = Description.Create()
webobj("Name").Value = "E-Mail"
webobj("Index").Value = "3"
Browser("SAMPLE").Page("Login").WebEdit(webobj).Set "a@a.a"
and another

Code:
Browser("Title:= SAMPLE").Page("Title:= Login").WebEdit("Name:= E-Mail", "Index:=3").Set "a@a.a"

Plz help me out....
Reply
#2
Solved: 11 Years, 4 Months, 3 Weeks ago
What kind of error you're getting...are you getting object not found ? well if that's the case then you should put in more values in your description for QTP to uniquely identify the object
Reply
#3
Solved: 11 Years, 4 Months, 3 Weeks ago
Your question is not clear...say smthing abt d error wat u r getting.
Reply
#4
Solved: 11 Years, 4 Months, 3 Weeks ago Exclamation 
Hi..

Have to keep my cursor in login tetxbox and hv to enter the details using descriptive programming..
The code mentioned in the previous post doesn't works...Is throws an error of "Object not found in Object Repository"


Hi,

Have to click the login field and enter the text using descriptive programming..

Used the codes mentioned in the previous post..It throws the error stating
"Cannot find the "[ WebEdit ]" object's parent "[ Page ]" (class Page). Verify that parent properties match an object currently displayed in your application."
Reply
#5
Solved: 11 Years, 4 Months, 3 Weeks ago
Well i did not understand why u r trying to keep object properties in Object Repositories where u r proceeding with Descriptive Programming...And your mentioned error generally found when the mentioned property is not identified by QTP in that page or that property is not sufficient to identify that object uniqulely..

In this case first find out the unique properties of ur textbox by spying on it...it may be 2 or 3 or more properties needed to identify that textbox uniquly...

Next thing--Clear out your Object repository coz it is not needed at all in Descriptive Programming....

Then Write--

Code:
Browser("property and value").Page("property and value").WebEdit("property and value").Set "value"


Make sure all the value and property should be unique to identify Browser, page and that particular WebEdit....Find out these properties by Spying on those objects....



Hope i am clear to u...let me know if any other information needed...Just drop me a mail on--- souvikghosh.diatm@gmail.com.....
Reply
#6
Solved: 11 Years, 4 Months, 3 Weeks ago
Thank You..Now its working fine ...

How can i make a click on the button using descriptive programming..?

This code throws an error

Code:
Browser("Title:= G").Page("Title:= G").WebButton("name:= btnLogin")

Get me out from this...
Reply
#7
Solved: 11 Years, 4 Months, 3 Weeks ago
well i can give u a shortcut way....i do not know what type of application u r automating...means that application made of which language...sometimes it happent QTP need addint to identify all objects of some particular languages..example as GWT or smart GWT....so r your application made by a stable language which is purely identyfy by QTP????make it sure first...



watever..the shortcut is as follows....

1. open a new test in QTP
2. make sure Object Repository is absolutely clear..
3. manually enter User Id and Password..
4. turn the record on in QTP..
5. now just record the Login Button press..and Stop Record.
6.Go to object repository and find what exact properties and values has been identify by QTP to recognize that button...
7. It may be 1/2/3 watever the properties are...Just use them in your DP..and try...It will work fine....



Try It.........
Reply
#8
Solved: 11 Years, 4 Months, 3 Weeks ago
Code:
Why shouldn't it? u have just specified object with no operation
Browser("Title:= G").Page("Title:= G").WebButton("name:= btnLogin").Click

by the way make sure your browser and page's title are exactly "G", if it is first letter of some string title, use G.*
Reply
#9
Solved: 11 Years, 4 Months, 3 Weeks ago
You can try this as it is common

Code:
Browser("Title:= .*").Page("Title:= .*").WebEdit("Name:= E-Mail", "Index:=3").Set "a@a.a"
Reply
#10
Solved: 11 Years, 4 Months, 3 Weeks ago

Hi,

Thanks..But the code is not working..suggest me some more ideas...
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Facing issue with Java Table to press Enter Key from Keyboard Nasir Ahmed 0 4,543 05-23-2014, 08:05 PM
Last Post: Nasir Ahmed
Question QTP Script for enter data to DB geethu105 2 3,338 02-24-2014, 06:54 PM
Last Post: guin.anirban
  How To pick up the particular mail in Post Login Gmail page and click on Checkbox akhandesh 0 2,869 12-02-2013, 01:35 PM
Last Post: akhandesh
  Unable to enter data in web table nistalaramesh 8 10,785 07-13-2012, 09:14 PM
Last Post: nistalaramesh
  How to enter data into textbox which is under the image link. Lakshman 4 5,167 02-23-2012, 12:14 PM
Last Post: inborntester

Forum Jump:


Users browsing this thread: 1 Guest(s)