Micro Focus QTP (UFT) Forums
Webedit is null While click on a button - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: Webedit is null While click on a button (/Thread-Webedit-is-null-While-click-on-a-button)



Webedit is null While click on a button - branjitk - 06-14-2012

Hi all,
I am having one doubt, the webedit box is going to null after click on a button.
I am using following Code,but the wscript exceutes, the cursor is going to URL edit box.

I am attaching the Screen Shot also. Please friends help me.

Code:
Browser("Browser").Page("Sailing Schedules").WebEdit("receipt_1").Set "Chennai, INDIA"
wait 2
Set wshell = Createobject("wscript.shell")
Browser("Browser").Page("Sailing Schedules").WebEdit("receipt_1").Click
wait 2
wshell.SendKeys "{DOWN}"
wait 2
wshell.SendKeys "{DOWN}"
wshell.SendKeys "{TAB}"
Browser("Browser").Page("Sailing Schedules").WebEdit("delivery_1").Set "Shanghai, 31, CHINA"
wait 2
Browser("Browser").Page("Sailing Schedules").WebEdit("delivery_1").Click
wait 2
wshell.SendKeys "{DOWN}"
wait 2
wshell.SendKeys "{DOWN}"
wshell.SendKeys "{TAB}"

Browser("Browser").Page("Sailing Schedules").WebEdit("earliestDeparture").Set "2012-06-05"
Browser("Browser").Page("Sailing Schedules").WebButton("Find Schedules").Click

Thanks & Regards,
Ranjit Kumar.B


RE: Webedit is null While click on a button - Ankesh - 06-14-2012

Could not understand what is the error you are facing? Could you please elaborate your requirement?

Regards,
Ankesh