Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
convert .Click to <enter>
#1
Code:
Browser("Lawson portal").Page("Lawson portal").WebEdit("WebEdit").Click

This is not firing correctly. The Click is not really correct for this action, how can I convert this into an <enter> command. I tried changing .Click to .Submit, but that didn't work
Reply
#2
What about webedit().set "" ? Does that not help? If you are adamant on using keyboard simulation then you may want to read about devicereplay and Sendkeys.
Oh..i almost forgot. Would you try the below code and see if that works?
Code:
Settings.webpackage("Replaytype") = 2 Browser("Lawson portal").Page("Lawson portal").Webedit("webedit").click Settings.webpackage("Replaytype") = 1
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply
#3
So far, neither of those ideas is working. I get an error trying the replaytype and the .Set "" just sits there. Can I input a pause? As weird as that sounds, I think it's blowing over the input and the cursor needs to be in the input box for it to work. There is not 'submit' button to map to.

Thanks
Reply
#4
Use "Set" instead of "Click":

Code:
Browser("Lawson portal").Page("Lawson portal").Webedit("webedit").Set "some text to enter in the edit box"
Reply
#5
My bad,
Please try this,
Code:
Setting.WebPackage("ReplayType") = 2 Browser("Lawson portal").Page("Lawson portal").Webedit("webedit").click Setting.WebPackage("ReplayType") = 1
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply
#6
>>>the cursor needs to be in the input box for it to work.

There is a QTP setting for that.Tools->Options->Windows Applications->Advanced->Run Settings->Edit Box->Click edit box before inserting text

Maybe that will help?
Reply
#7
Still no joy. I think the only way this will work is using SendKey of the enter key. Can I script that and then call it in a QTP action? if so, how would I do that?
Reply
#8
But it wasnt windows app..was it?
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply
#9
Success!
Had to use SendKeys:
Code:
Set WshShell = CreateObject("WScript.Shell") WshShell.SendKeys "{ENTER}"
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [UFT] Get Item of ListBox and convert it to array felino 1 2,918 11-26-2015, 02:20 PM
Last Post: felino
  Unable to pass "Enter" Key through Sendkeys Lavanya N 1 4,666 07-24-2015, 02:17 PM
Last Post: Lavanya N
  How to convert a single dimension array to two dimensional array venkatesh9032 3 6,427 02-10-2014, 03:07 PM
Last Post: pranikgarg
  How to enter values into excel which is already open using QTP Narayanan 1 4,874 12-11-2013, 07:30 AM
Last Post: basanth27
  Right Click On a Image and Click on a Link in WebElement RameshKrishnan 4 6,219 07-10-2013, 04:13 PM
Last Post: RameshKrishnan

Forum Jump:


Users browsing this thread: 1 Guest(s)