1) rather than just specifying myObj Login it is more robust if ur code would have been like this
myobj name: Login
this is called descriptive programming . here we are telling the QTP to find an Webedit box which has the Name property value which is equal to Logine. if you start programming in this way . u dont even need an entry in the OR.
try deleting this entry in OR and run the scipt.
this wil make your overall script light and easier to load however execution time is slightly increased.
2) the second flaw i think was a typo in your code the web edit box is speeled as wenedit.
It can also be done by renaming the object name in ur OR. By renaming the object name in the OR would be more convinient as it would be reflected in all ur scripts wherever the object has been used at its own.
Note: Check out the property of that object in Object Repository and according to set that value then it's work definately. Check in OR and afterwards delete that OR. Ok Bye
RE: Hi All,my Object name is "Login".my code is:browser("B1").page("P1").WebEdit("Login").Set "Admin"CAN I USE IT LIKE THIS?myObj = "Login"browser("B1").page("P1").WenEdit (myObj).Set "Admin"It is not working. How to do in this situation?
Set myObj Description.Create BrowserObj("name").Value "Login"
RE: Hi All,my Object name is "Login".my code is:browser("B1").page("P1").WebEdit("Login").Set "Admin"CAN I USE IT LIKE THIS?myObj = "Login"browser("B1").page("P1").WenEdit (myObj).Set "Admin"It is not working. How to do in this situation?
sorry for the mistake
Set myObj Description.Create myObj("name").Value "Login"
RE: Hi All,my Object name is "Login".my code is:browser("B1").page("P1").WebEdit("Login").Set "Admin"CAN I USE IT LIKE THIS?myObj = "Login"browser("B1").page("P1").WenEdit (myObj).Set "Admin"It is not working. How to do in this situation?
Hi
Your script is okie but it got a small misteke. i.e you are assigning ur object to some variable and u r using that var insted of that u do like this
set myobj "Login" Browser("B1").page("P1").WebEdit(myobj).set "Admin"