The online community for software testing & quality assurance professionals
 
 
Calendar   Today's Topics
Sponsors:




Lost Password?

Home
BetaSoft
Blogs
Jobs
Training
News
Links
Downloads



Testing Tools >> IBM/Rational Robot

Pages: 1
Suresh_Kumar_N
Newbie


Reged: 01/28/09
Posts: 20
I Cant click the link in HTMLTable? Please Help?
      #689794 - 10/28/11 02:16 AM Attachment (166 downloads)

Hi,

Application : Novel Application
Product: Web based application

This application, most of frames developed in HTMLTable and HTML Document.

PLEASE REFER THE ATTACHED PICTURE

Issue1: I cant pick the cell value from HTMLDocument

Issue2: Rational robot not able to identify the objects in novel application

Issue3: I cant click the Column1 value in that particular row.


Workaround: I find the row based on column3 and column6. So after finding the row (using string manipulation) I need to click the column1 cell for navigate to next page.
I find the row and column, but I am not able to click the link on COLUMN1 and requiredROW

Any one please help to find the workaround?

Thanks in advance!!!


Script:

Function SelectTask_IDMAppOwner (IDMProcess as string, ProcessFor as string, RecipientFLName as string)
'IDMProcess =Joiner, Update, Leaver, Immediate Leaver
'ProcessFor = Approval
'RecipientFLName = RecipientFirstName," ",RecipientLastName
Dim HTMLTableiText as Variant
Dim Len_HTMLTableiText, Pos_Priority, Len_TotalTask, PosProcess, Recipient_Pos, Len_FindNoOfprocessinTasklist as Integer
Dim PosJoiner1, PosUpdate1, PosLeaver1, PosImeediateLeaver1, CountProcess, PriCountTrimedString as Integer
Dim TotalTask, TaskProcess, TaskSelect_WindowCaption, InternetExplorer, FindNoOfprocessinTasklist as string
Dim RowCount, Len_FindRecipientrowTasklist, PosProcessrow, CountTrimedString, TrimfromLeft as integer
Dim FindRecipientrowTasklist, FindLinkonRecipient, FindSpace, JULIL_Process, LorIL_Process as string
Dim Space_FS, Len_FindLinkonRecipient, FS, CountSpace, Temp(50) as integer
Dim ClickHTMLLink, Temp_Text (10) as string

TaskSelect_WindowCaption = "Approval Task List"
'InternetExplorer = "Microsoft Internet Explorer provided by COE"
InternetExplorer = "Windows Internet Explorer"

'Sorting by Task
Window SetContext, "Caption="+TaskSelect_WindowCaption +" - "+InternetExplorer, ""
Browser NewPage,"HTMLTitle="+ TaskSelect_WindowCaption +";Index=0",""
HTMLLink Click, "HTMLText=Task", ""
Delayfor 5000

'Get the InnerText from HTMLTable
Window SetContext, "Caption="+TaskSelect_WindowCaption +" - "+InternetExplorer, ""
Browser SetFrame,"Type=HTMLFrame;Index=0",""
SQAGetProperty "Type=HTMLTable;HTMLId=apwaTaskListTableId", "InnerText", HTMLTableiText 'InnerText = HTMLTableiText
Delayfor 1000
SQAConsoleWrite "HTMLTableiText :"+HTMLTableiText
SQAConsoleWrite " "

If HTMLTableiText = "" then
SQAConsoleWrite "innertext value is NULL. Object is not Recognized."
Else
SQAConsoleWrite "HTMLTable Value from Requests & Approvals Task List:"+HTMLTableiText
SQAConsoleWrite " "
End iF

'Getting only Task list Using string manipulation
Len_HTMLTableiText = Len(HTMLTableiText)
Pos_Priority = Instr(HTMLTableiText,"Priority") 'find the priority position
TotalTask = Right (HTMLTableiText, (Len_HTMLTableiText - (Pos_Priority+10))) 'Trim the value '10 is length of priority with space
Len_TotalTask = Len(TotalTask)
SQAConsoleWrite "Total list of Tasks:"+TotalTask

If TotalTask = " " or Len_TotalTask < 25 then
SQALogMessage SQAFail, "There is no task on this user",""
else
'Go Ahead

'Find the position of recipient name from TotalTask
Recipient_Pos = Instr (TotalTask, RecipientFLName)
SQAConsoleWrite "Recipient First and last name Position:"& Recipient_Pos

''Find the Total Number of Task
FindNoOfprocessinTasklist = TotalTask
Do Until PosProcess >= Len_TotalTask'find the toal number of task
'Do Until PosProcess = 0
PosProcess = Instr (FindNoOfprocessinTasklist, " Process-") 'find the process position
SQAConsoleWrite "PosProcess:"&PosProcess
Len_FindNoOfprocessinTasklist = Len (FindNoOfprocessinTasklist) 'Length of total task
FindNoOfprocessinTasklist = Right (FindNoOfprocessinTasklist, (Len_FindNoOfprocessinTasklist - (PosProcess+8))) 'Trim the value upto first process, 9 is char length of ' Process-'
SQAConsoleWrite "Total Task After trim the "& CountProcess &" Process:"+FindNoOfprocessinTasklist
SQAconsoleWrite "CountProcess:"&CountProcess
If PosProcess = 0 then
Exit Do
End If
CountProcess = CountProcess + 1 'Count no of process
Loop

'TotalNumber of Tasks
SQACOnsoleWrite "Total Number of Tasks:"&CountProcess
SQALogMessage SQANone,"Total Number of Tasks:"&CountProcess,""


''Find the row number of the recipient
FindRecipientrowTasklist = TotalTask
RowCount = 0
Do Until CountTrimedString >= Recipient_Pos 'find the toal number of task
PosProcessrow = Instr (FindRecipientrowTasklist, " Process-") 'find the process position
SQAConsoleWrite "PosProcess:"&PosProcessrow
Len_FindRecipientrowTasklist = Len (FindRecipientrowTasklist) 'Length of total task
TrimfromLeft = PosProcessrow+8
FindRecipientrowTasklist= Right (FindRecipientrowTasklist, (Len_FindRecipientrowTasklist - TrimfromLeft)) 'Trim the value upto first process, 9 is char length of ' Process-'
SQAConsoleWrite "Total Task After trim the "& CountProcess &" Process:"+FindRecipientrowTasklist
SQAconsoleWrite "RowCount:"&RowCount
CountTrimedString = CountTrimedString + TrimfromLeft 'Count the length of string from start
Temp(RowCount) = CountTrimedString
SQAConsoleWrite "Count TrimedString:"+CountTrimedString
If PosProcessrow = 0 then
Exit Do
End If
RowCount= RowCount+ 1 'Count no of process
Loop


'Find the Link on recipient row
' 'Find the process Type of Process
' 'Joiner Process
' 'Update Process
' 'Leaver Process
' 'Immediate Leaver Process

' PriCountTrimedString = Temp(RowCount-2)
' FindLinkonRecipient = Left (TotalTask, PriCountTrimedString - 9) 'up to process
' Len_FindLinkonRecipient =Len(FindLinkonRecipient)
' SQAConsoleWrite "Find Link on Recipient:"+FindLinkonRecipient
' SQAConsoleWrite "Length of FindLinkonRecipient:"+Len_FindLinkonRecipient
'
' JULIL_Process = Right (FindLinkonRecipient,6) '6 is length of Joiner, Update, Leaver
' SQAConsoleWrite "JULIL_Process:"+JULIL_Process
' If JULIL_Process = "Joiner" then
' SQAConsoleWrite "Recipient process is:Joiner Process-"
'
' ElseIf JULIL_Process = "Update" then
' SQAConsoleWrite "Recipient process is:Update Process-"
'
' ElseIf JULIL_Process = "Leaver" then
' LorIL_Process = Right (FindLinkonRecipient,16) '16 is length of Immediate Leaver
' SQAConsoleWrite "LorIL_Process:"+LorIL_Process
'
' If LorIL_Process = "Immediate Leaver" then
' SQAConsoleWrite "Recipient process is:Immediate Leaver Process-"
' else
' SQAConsoleWrite "Recipient process is:Leaver Process-"
' end if
' End If

'Get the line of string from process
PriCountTrimedString = Temp(RowCount-2)
FindLinkonRecipient = Right(TotalTask, (Len_TotalTask-PriCountTrimedString)) 'Line values from the 'process-'
Len_FindLinkonRecipient =Len(FindLinkonRecipient)
SQAConsoleWrite "Find Link on Recipient:"+FindLinkonRecipient
SQAConsoleWrite "Length of FindLinkonRecipient:"+Len_FindLinkonRecipient

'Capture the first 4 word for making the Link
For FS = 1 to Len_FindLinkonRecipient
FindSpace = mid (FindLinkonRecipient,FS,1)
If FindSpace = " " then
Space_FS = FS
CountSpace = CountSpace + 1
Temp_Text (CountSpace ) = Left (FindLinkonRecipient,(FS-1))
SQAConsoleWrite "Temp_Text ("& CountSpace &"):"+Temp_Text (CountSpace)
If CountSpace = 5 then 'to get first 5 space
Exit for
End if
Else
'continue the loop
End If
Next FS

'Recipient Located Row
SQACOnsoleWrite "Input Recipient ("+ RecipientFLName +") Location on list(row):"&RowCount
SQALogMessage SQANone,"Input Recipient ("+ RecipientFLName +") Location on list(row):"&RowCount,""

'Frame the HTML Link
'HTMLLink Click, "HTMLText=Joiner Process-IDM Access Approval", "Row="& RowCount &";Col=1"
ClickHTMLLink = IDMProcess +" Process-IDM Access "+ProcessFor
SQAConsoleWrite "Click HTML Link and Index ("& RowCount &"):"+ClickHTMLLink

'Click the Task based on the recipient
'Window SetContext, "Caption=Approval Task List - Microsoft Internet Explorer provided by EDS COE", ""
Window SetContext, "Caption="+TaskSelect_WindowCaption +" - "+InternetExplorer, ""
Browser SetFrame,"Type=HTMLFrame;Index=0",""
Browser NewPage,"HTMLTitle=Approval Task List;Index=0",""
HTMLTable Click, "HTMLId=apwaTaskListTableId", "Row="& RowCount &";Col=1" 'Click on the task
HTMLLink Click, "HTMLText="+ClickHTMLLink, "Row="& RowCount &";Col=1"

'Window SetContext, "Caption=Approval Task List - Microsoft Internet Explorer provided by EDS COE", ""
Window SetContext, "Caption="+TaskSelect_WindowCaption +" - "+InternetExplorer, ""
Browser SetFrame,"Type=HTMLFrame;Index=0",""
Browser NewPage,"HTMLTitle=Approval Task List;Index=0",""
HTMLLink Click, "HTMLText="+ ClickHTMLLink +";Index="& RowCount, ""
Delayfor 5000

End If

End Function

--------------------
Suresh Kumar N.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
0 registered and 7 anonymous users are browsing this forum.

Moderator:  AJ, RSBarber 

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Topic views: 1895

Rate this topic

Jump to

Contact Us | Privacy statement SQAForums

Powered by UBB.threads™ 6.5.5