Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SendKeys changing focus to IE url when executed from framework
#1
Not Solved
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:

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
-> submit instead of pushing enter key is not working on my WebEdit

2)
Code:
Browser().Page().WebEdit().Object.focus
-> not working as Sendkeys is again executed on the URL

3)
Code:
Wait(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:
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!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Changing Data in the application newbieny 0 761 07-17-2019, 07:11 PM
Last Post: newbieny
  How to get URL/Location from Address bar of any open window in Windows 7 kalpmist 0 4,309 05-11-2015, 07:23 PM
Last Post: kalpmist
  WebElement disappears on change of focus EGBELL 0 2,250 01-05-2015, 08:09 PM
Last Post: EGBELL
  Not able to do any operation on upper applet when focus is on lower applet. sonqtp 0 1,842 06-18-2012, 02:23 PM
Last Post: sonqtp
Wink Getting the url of the web page being tested qtpuser 2 3,409 01-30-2012, 10:22 AM
Last Post: vinod123

Forum Jump:


Users browsing this thread: 1 Guest(s)