Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Facing issue with Java Table to press Enter Key from Keyboard
#1
Not Solved
Hi,
We have Java Application in which we have to enter the data in Java tables. Some Java tables are visible and some are not visible to naked eye as the scroll down operation is required to make them visible.
Each Java table is designed in a way that row will created dynamically by pressing the Enter key from Keyboard. The Script is working fine for the java tables which are visible to naked eye. To add new row to a java table which is not visible to naked eye first scroll down needs to be done to make the java table visible. Then Select cell in order to press Enter Key from Keyboard. While performing Select cell operation the Scroll will move upwards by itself making the java table as invisible. Hence the QTP will execute the entire script without creating new row. If we make the scroll down also then we have to select and then press enter, again it scrolls up. Hence we require help to solve this query as we are stuck and we can’t move forward.

We had tried the option which are provided in help file.However we are not succeeded to meet the expectation. The options are mentioned below.
 Activate Cell/Row/Column provided in QTP
 Set Cell provided in QTP
 Click Cell/Double Click Cell provided in QTP
 Send Keys from Shell Object
 Fire Event provided in QTP

We noticed that if we perform the methods provided by QTP on Java table then the scroll will automatically move up to the default position.


‘’’The Block of code will Iterate the loop in order to find non empty cell in excel sheet
Code:
For intRow=3 to intRowCount
intAppRowCounter=0
           For intColumn =1  to  intAppColCount
        strCellData= get the data from Excel sheet
        If strCellData= EMPTY  Then
              intAppRowCounter=  intAppRowCounter+1
        End If
         Next
‘This block of code perfrom Keyboard operation such as Press Enter
Code:
If   intAppRowCounter=0 Then
        Set objWshShell = CreateObject("WScript.Shell")      
        objJavaTable.SelectCell strRow,strColumn
        objWshShell.SendKeys "{ENTER}"  
    End If
    Next
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Emulating keyboard actions in MS Edge Browser with UFT 14.03 Sekhar9999 0 1,003 06-19-2018, 07:20 PM
Last Post: Sekhar9999
  How to press the space bar with send keys method Hari Prasad 5 25,213 06-03-2016, 10:47 AM
Last Post: Vijayaragavan.thangam
  Facing Issue with "GetItem" method of JavaList Nasir Ahmed 0 2,823 10-31-2014, 12:25 PM
Last Post: Nasir Ahmed
Question QTP Script for enter data to DB geethu105 2 3,316 02-24-2014, 06:54 PM
Last Post: guin.anirban
  Keyboard input in script Anurag Tygai 1 2,750 12-24-2013, 06:03 PM
Last Post: sshukla12

Forum Jump:


Users browsing this thread: 1 Guest(s)