Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to perform keyboard and click actions
#1
Not Solved
Hi,

Can anyone resolve below query:

Scenario - Select two web tables from the application

1. Select first web table
2. Press Ctrl button from keyboard
3. Select second web table

Bwlos is the code i tried:

Code:
Set ODesc=Description.Create()
        ODesc("html tag").Value="TABLE"
        ODesc("text").Value="ABC"
        Browser("S2 Product Control").Page("P&L View").WebTable(ODesc).Click

        Set WshShell = CreateObject("WScript.Shell")
        WshShell.SendKeys("^")

        Set ODesc1=Description.Create()
        ODesc1("html tag").Value="TABLE"
        ODesc1("text").Value= "XYZ"
        Browser("S2 Product Control").Page("P&L View").WebTable(ODesc1).Click

Thanks,
Ravi
Reply
#2
Not Solved
you code should work only you need to make sure that first webtable should be activate
Reply
#3
Not Solved
Hi,

For the above code, two rows are not selected. Only one row is clicked.
Tried with below code as well, but did not work...

can anyone help me on this??

Code:
Set ODesc=Description.Create()
ODesc("html tag").Value="TABLE"
ODesc("text").Value="ABC"
Browser("XXX").Page("YYY").WebTable(ODesc).Click

Set DeviceReplay = CreateObject("Mercury.DeviceReplay")
DeviceReplay.KeyDown 29 ‘ 29 is for control

Set ODesc1=Description.Create()
ODesc1("html tag").Value="TABLE"
ODesc1("text").Value= "XYZ"
Browser("XXX").Page("YYY").WebTable(ODesc1).Click
DeviceReplay.KeyUp 29 ‘ 29 is for control
Reply
#4
Not Solved
Correction:
Code:
Set ODesc1=Description.Create()
ODesc1("micclass").Value="[b]Webtable[/b]"
ODesc1("text").Value= "XYZ"
set objects=Browser("S2 Product Control").Page("P&L View").[b]ChildObjects(ODesc1)[/b]
[b]objects(0).click[/b]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  KeyBoard Events ravi.gajul 4 16,089 07-19-2017, 08:49 PM
Last Post: sathish_win@outlook.com
  how to use keyboard "Space' using qtp Naresh 2 3,099 06-11-2015, 06:30 PM
Last Post: venkatesh9032
  How to call Actions from other Actions Naresh 1 7,966 09-25-2014, 10:26 AM
Last Post: vinod123
  Same command needs to be performed twice to actually perform it pistaa 2 2,915 04-25-2014, 01:26 PM
Last Post: pistaa
  Problem in Input from keyboard:sendkeys Rachna 1 4,974 10-14-2013, 06:07 PM
Last Post: anil2u

Forum Jump:


Users browsing this thread: 3 Guest(s)