Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with Capturing objects(DropDown,Table) in SAP application
#1
Not Solved
Hi All,

This is first time I am automating SAP application, I Installed SAP Add-in for automating the SAP application.
SAP application details are as follows:
Portal : NetViewer Portal
Developed Languages : ABAP and Java

My problem:

1. Capturing DropDown:
I tried to capture dropdown object with Object repository but it shows as 2 WebEdit(TextBoxes). one for to set the value and one for selecting the drop down. I tried to set the value for the first WebEdit but it shows as Object is disabled.

2. Select values in the table:
I have a table with 3 columns where first column to select the row, secound describes about the row value and third column shows the value applicable for the pirticular user.
Problem is I am not able to select the first column I tried in the following way:
a) Select the child objects of the table and get the RunTime properties.
b) First column values shows as class = WebElement and text = "Selection Area".
c) so I created a Description object by using class = WebElement and text = "Selection Area"
d)Tried to click on the selected webelement.
e)Here from the script it displays as Web Element is clicked but in the application it is not clicking on the web element.

3. Inserting the value to the text box. Probelm is while Inserting the value to the text box it is displaying as Object is disabled(This problem exist only for one text box in the application. I have used the following code for enabling the text box and inserting the value as follows:

Code:
Browser("V").Page("V").SAPFrame("V").WebEdit("t").Object.disabled = False
Browser("Vedlikehold tidsdata -").Page("Vedlikehold tidsdata").SAPFrame("Vedlikehold tidsdata").WebEdit("txtLeaveType").Click
Browser("V").Page("V").SAPFrame("V").WebEdit("t").Set strLeaveType

But still it is not working.

Please help me on above 3 problems.
Reply
#2
Not Solved
HI ALL ,

Could some one help me on this this Please, I am waiting for the reply...
Reply
#3
Not Solved
Hi SaranKumar,
Please find below code for Click_webElement in Portal ,I used same function for my SAP portal project...............

Code:
Public Function fn_Portal_ClickWebElement_Page(strPageTitle,strWebElementHtmlId_InnerText)
'*Variable Declarations
Dim objBrowser,objPage,objAllBrowser,objPortal,objWebElement
'*Browser Object
    Set objBrowser = Description.Create
    objBrowser("micclass").Value = "Browser"
    '*Get all browsers object
    Set objAllBrowser = Desktop.ChildObjects(objBrowser)
'*Page Object
    Set objPage = Description.Create
    objPage("micclass").Value = "Page"
    objPage("title").Value = strPageTitle
'*Portal Object
    Set objPortal = Description.Create
    objPortal("micclass").Value = "SAPPortal"
'*Web Element Object
    Set objWebElement = Description.Create
    objWebElement("micclass").Value = "WebElement"
    objWebElement("html id").Value = strWebElementHtmlId_InnerText

'*Look for the web element and click if it exists
If Browser("creationtime:=" & objAllBrowser.Count - 1).Page(objPage).Exist(0) Then
    If Browser("creationtime:=" & objAllBrowser.Count - 1).Page(objPage).WebElement(objWebElement).Exist(0) Then
       Browser("creationtime:=" & objAllBrowser.Count - 1).Page(objPage).WebElement(objWebElement).click
        fn_Portal_ClickWebElement_Page=true
    Else
             '*Web Element Object
            Set objWebElement = Description.Create
            objWebElement("micclass").Value = "WebElement"
            objWebElement("innertext").Value = strWebElementHtmlId_InnerText
            If Browser("creationtime:=" & objAllBrowser.Count - 1).Page(objPage).WebElement(objWebElement).Exist(0) Then
                Browser("creationtime:=" & objAllBrowser.Count - 1).Page(objPage).WebElement(objWebElement).click
                fn_Portal_ClickWebElement_Page=true
            Else
                fn_Portal_ClickWebElement_Page=false
            End if
    End if
ElseIf Browser("creationtime:=" & objAllBrowser.Count - 1).SAPPortal(objPortal).Exist(0) Then  
    If Browser("creationtime:=" & objAllBrowser.Count - 1).SAPPortal(objPortal).WebElement(objWebElement).Exist(0) Then
       Browser("creationtime:=" & objAllBrowser.Count - 1).SAPPortal(objPortal).WebElement(objWebElement).click
        fn_Portal_ClickWebElement_Page=true
    Else
             '*Web Element Object
            Set objWebElement = Description.Create
            objWebElement("micclass").Value = "WebElement"
            objWebElement("innertext").Value = strWebElementHtmlId_InnerText
            If Browser("creationtime:=" & objAllBrowser.Count - 1).SAPPortal(objPortal).WebElement(objWebElement).Exist(0) Then
                Browser("creationtime:=" & objAllBrowser.Count - 1).SAPPortal(objPortal).WebElement(objWebElement).click
                fn_Portal_ClickWebElement_Page=true
            Else
                fn_Portal_ClickWebElement_Page=false
            End if
    End if
Else
    fn_Portal_ClickWebElement_Page=false
End if

'*Releasing variables
    Set objBrowser=Nothing
    Set objPage=Nothing
    Set objAllBrowser=Nothing
    Set objPortal=Nothing
    Set objWebElement=Nothing

End Function
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Facing a problem while identifying Angular JS objects in a web page vangasantosh 0 1,241 12-20-2017, 01:26 PM
Last Post: vangasantosh
  UFT doesn't recognize SAP objects when it's openned by portal DevRenanGaspar 0 2,513 09-28-2017, 07:41 PM
Last Post: DevRenanGaspar
  capturing message on web page when caps lock is on helan 0 2,386 04-29-2015, 05:25 AM
Last Post: helan
  UFT 12 unable to recognize the objects of a java based application (jre - 1.7.0_65) Sushant Dasgupta 2 9,212 09-17-2014, 03:47 PM
Last Post: Sushant Dasgupta
Cool ntdll.dll crash problem with UFT 11.5 Application in Windows Server 08 gangadhar 1 4,858 06-13-2014, 04:43 PM
Last Post: vinod123

Forum Jump:


Users browsing this thread: 1 Guest(s)