06-09-2015, 07:19 PM
Hi All,
I am trying to automate a short scenario where a value is inserted to the WebEdit and submited via SendKeys "{ENTER}", see code bellow:
Issue description:
Everything is working as expected when i am running the script from UFT tool as a single script, but as soon as I am using a framework build on AOM to execute this script at the end of a scenario (couple scripts are executed before this one), SendKeys method is focused on the IE URL instead of WebEdit...
I have tried following things:
1) -> submit instead of pushing enter key is not working on my WebEdit
2)-> not working as Sendkeys is again executed on the URL
3) -> waiting did not help at all, it is clear that right before SendKeys execution focus is changed to the IE URL
Framework description:
It might look like the framework is changing the focus somehow to the IE URL but i doubt it because the execution of the script in framework is represented in one line:
where objResult represent path to the result folder. Also when this line is executed (script is executed) framework is not doing anything.
If possible please can someone point me to the right direction how to figure this out?
Thank you for your time and effort!
I am trying to automate a short scenario where a value is inserted to the WebEdit and submited via SendKeys "{ENTER}", see code bellow:
Code:
Dim oShell
Set oShell = CreateObject("WScript.Shell")
Browser().Page().WebEdit().Set("My text")
Browser().Page().WebEdit().Click
oShell.SendKeys "{ENTER}"
Set oShell = Nothing
Issue description:
Everything is working as expected when i am running the script from UFT tool as a single script, but as soon as I am using a framework build on AOM to execute this script at the end of a scenario (couple scripts are executed before this one), SendKeys method is focused on the IE URL instead of WebEdit...
I have tried following things:
1)
Code:
Browser().Page().WebEdit().Submit
2)
Code:
Browser().Page().WebEdit().Object.focus
3)
Code:
Wait(3)
Framework description:
It might look like the framework is changing the focus somehow to the IE URL but i doubt it because the execution of the script in framework is represented in one line:
Code:
objTest.Run objResult
where objResult represent path to the result folder. Also when this line is executed (script is executed) framework is not doing anything.
If possible please can someone point me to the right direction how to figure this out?
Thank you for your time and effort!