Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
convert .Click to <enter>
#1
Solved: 11 Years, 3 Months, 4 Weeks ago
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
Solved: 11 Years, 3 Months, 4 Weeks ago
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
Solved: 11 Years, 3 Months, 4 Weeks ago
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
Solved: 11 Years, 3 Months, 4 Weeks ago
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
Solved: 11 Years, 3 Months, 4 Weeks ago
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
Solved: 11 Years, 3 Months, 4 Weeks ago
>>>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
Solved: 11 Years, 3 Months, 4 Weeks ago
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
Solved: 11 Years, 3 Months, 4 Weeks ago
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
Solved: 11 Years, 3 Months, 4 Weeks ago
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,434 11-26-2015, 02:20 PM
Last Post: felino
  Unable to pass "Enter" Key through Sendkeys Lavanya N 1 4,158 07-24-2015, 02:17 PM
Last Post: Lavanya N
  How to convert a single dimension array to two dimensional array venkatesh9032 3 5,515 02-10-2014, 03:07 PM
Last Post: pranikgarg
  How to enter values into excel which is already open using QTP Narayanan 1 4,391 12-11-2013, 07:30 AM
Last Post: basanth27
  Right Click On a Image and Click on a Link in WebElement RameshKrishnan 4 5,402 07-10-2013, 04:13 PM
Last Post: RameshKrishnan

Forum Jump:


Users browsing this thread: 3 Guest(s)