Child object property keep changing
Hi guys
I have problem with one script.
My script is:
Browser("abc").Page("xyz").WebEdit("aaa").Set 123
Above code my the WebEdit value is change "bbb".May be in next release my programmer will again change the WebEdit property So could anyone please tell me how to handle this situation.
Please help me.
Thanks
Newhere
Re: Child object property keep changing
You will need to update your script again.
There might be another way though. How comfortable are you with HTML DOM?
Re: Child object property keep changing
Hi anshoo thanks for your reply.
i am not comfy with html dom. Well in my script when recorded earlier my object name was “ID” and now its changed to “FROM ID” so when i run my test i am getting error: [b](cannot identify the object "id" (of class webedit). Verify that this object's properties match an object currently displayed in your application.)[/b]
I tried to changed the object name manually in my script and also in OR still getting error message. This is my script:
[color="darkred"]browser("admin").page("admin_3").webedit("id").set "id10002"[/color]
In My company everybody new for QTP just couple of month back they have introduced.
Thanks
Newhere
Re: Child object property keep changing
You can use the following method and see if your script works as expected:
1. Use the Object Spy and click on the WebEdit which has its description altered by the Dev team
2. Find the "name" property and see its "value" to its right (in the 2nd column)
Now, use that value and plug it in the following script:
[COLOR=NAVY]Browser("admin").Page("admin_3").WebEdit("name:=from id").Set "id10002"[/COLOR]
Note that the value next to "name:=" is "from id". This "from id" is the value to the right of the "name" property that you retrieved from the Object Spy.
Let me know if this works..
Re: Child object property keep changing
[QUOTE=Anshoo_Arora;28868]You can use the following method and see if your script works as expected:
1. Use the Object Spy and click on the WebEdit which has its description altered by the Dev team
2. Find the "name" property and see its "value" to its right (in the 2nd column)
Now, use that value and plug it in the following script:
[COLOR=NAVY]Browser("admin").Page("admin_3").WebEdit("name:=from id").Set "id10002"[/COLOR]
Note that the value next to "name:=" is "from id". This "from id" is the value to the right of the "name" property that you retrieved from the Object Spy.
Let me know if this works..[/QUOTE]
Thanks Man
I tried above script but not working. Again i tried to change name in OR manually now its working but Thanks for you help. I m gonna find out what was wrong in my script. Why it wasnt working as you say.
Thanks
Newhere