Quantcast
Channel: Micro Focus QTP (UFT) Forums - All Forums
Viewing all 1653 articles
Browse latest View live

[UFT] Connection String for Oracle

$
0
0
Hi,
i'm using SQL Developer for to connect to the database.
I have this parameters:
- username
- password
- hostname
- port
- SID

In VBScript, which is the connection string correct?

I tried more different connection strings, but nothing works.

Thanks.

Canvas Automation (HTML5)

$
0
0
Hi,

I am trying to automate a web app that is using Canvas (HTML5) to display a table with contents in it. 

I need to perform 2 activity:
  1. click on a specific element 
  2. fetch the data from the Canvas

Thanks

.png   Capture.PNG (Size: 14.42 KB / Downloads: 13)

Intermitent "Object not visible" error

$
0
0
Hi All,

I have a problem with clicking a type "WebElement" object in a webpage on Google Chrome Version 47.0.2526.106 m with the HP Unified Functional Testing Agent installed.
It is the "Last" button on this navigation pane. 

[Image: 8Qw1AIl.png]

The object exists because it is entering my if statement that checks it, but intermittently shows an "Object not visible" error. Whenever it does run it just passes the line of code without clicking the object.
Code:
If Browser("ATH Móvil - F.A.M.A").Page("ATH Móvil - F.A.M.A").WebElement("Last_2").Exist(3) Then
   Browser("ATH Móvil - F.A.M.A").Page("ATH Móvil - F.A.M.A").WebElement("Last_2").Click
End If

[Image: O2SiTUF.png]

I have been stuck on this for a few days and have searched (including this forum), unsucessfully for a solution. 
THINGS I HAVE TRIED (and failed with):
-Putting both UFT and the Browser page on the same monitor (my main monitor)
-Using a dynamic object:
Code:
'Dynamic Object Creation
Dim LastDesc
Dim colNav

Set LastDesc = Description.Create
LastDesc("html id").Value = "theTable_last"
LastDesc("micClass").Value = "WebElement"

Set colNav = Browser("ATH Móvil - F.A.M.A").Page("ATH Móvil - F.A.M.A").ChildObjects(LastDesc)
colNav(0).Click
-Using .FireEvent("OnClick")

Please help. This is a very strange issue I've been dealing with. I appreciate any suggestions or solutions if you have them. Thanks in advance.

DataTable - Reuseable Actions

$
0
0
I am using reuseable object and the datatable is readonly / locked, I can not change the data.

I am saving the transaction to my local machine and making changes and then using "Call to Existing action" and select the action from local machine and saving to network(ALM).

Is this the correct way, Please suggest.

Thanks
Sad
Shripad Jumde

[UFT] Len of DIV founded by ClassName

$
0
0
Hi,
I'm testing a web application.

In Firebug of Firefox, with this code I have to check the num of div with my className:
Code:
$(document).ready(function() {
  alert( $('.blockPage').length );
});
It displays 0.

In UFT I'm using this code:
Code:
Set loader = Browser("myApp").Page("myApp").Object.getElementsByClassName("blockPage")
var exist = Len(loader)
exist is equals to 8.

Why is there this two different values?

Thanks.

Descriptive PROGRAMMING

$
0
0
Hi All,

I was writing a function to take create objects using descriptive programming. 
I donno where i went wrong, but the object is not getting returned correctly..
Below is the code.. ANyone please help me on this


Public Function fnObjectWithDescriptiveProgram(strObjectMicClass, strObjectProperties)
    On Error Resume Next
    Err.Clear
    
    'Declaring Description Create
    Dim oDesc, DictObjectProperties, strPropertyValues, strProperties
    Set oDesc = Description.Create 
    Set DictObjectProperties = CreateObject("Scripting.Dictionary")
    If strObjectProperties <> "" Then 
        strPropertyValues = SPLIT(strObjectProperties, ",") 
        strProperties = Array("name""html id""html tag""text""innertext""column names""index""alt""image type""file name""all items")
        For itr = 0 To UBOUND(strProperties)
            If strPropertyValues(itr) <> "" Then
                DictObjectProperties.Add strProperties(itr), strPropertyValues(itr)
            End If
        Next
    End If
    
    Select Case UCASE(strObjectMicClass)
        
        Case "BROWSER"
            oDesc("micclass").Value = "Browser"
        
        Case "PAGE"
            oDesc("micclass").Value = "Page"
            
        Case "WEBBUTTON"
            oDesc("micclass").Value = "WebButton"
            oDesc("type").Value = "button"
            For each item in DictObjectProperties
                oDesc(item).Value = DictObjectProperties(item)
            Next
            
        Case "WEBEDIT"
            oDesc("micclass").Value = "WebEdit"
            oDesc("type").Value = "text"
            For each item in DictObjectProperties
                oDesc(item).Value = DictObjectProperties(item)
            Next
            
        Case "EMAIL"
            oDesc("micclass").Value = "WebEdit"
            oDesc("type").Value = "email"
            For each item in DictObjectProperties
                oDesc(item).Value = DictObjectProperties(item)
            Next
            
        Case "PASSWORD"
            oDesc("micclass").Value = "WebEdit"
            oDesc("type").Value = "password"
            For each item in DictObjectProperties
                oDesc(item).Value = DictObjectProperties(item)
            Next
            
        Case "WEBELEMENT"
            oDesc("micclass").Value = "WebElement"
            For each item in DictObjectProperties
                oDesc(item).Value = DictObjectProperties(item)
            Next
            
        Case "LINK"
            oDesc("micclass").Value = "Link"
            For each item in DictObjectProperties
                oDesc(item).Value = DictObjectProperties(item)
            Next
            
        Case "IMAGE"
            oDesc("micclass").Value = "Image"
            For each item in DictObjectProperties
                oDesc(item).Value = DictObjectProperties(item)
            Next
            
        Case "WEBCHECKBOX"
            oDesc("micclass").Value = "WebCheckBox"
            oDesc("type").Value = "checkbox"
            For each item in DictObjectProperties
                oDesc(item).Value = DictObjectProperties(item)
            Next
            
        Case "WEBRADIOGROUP"
            oDesc("micclass").Value = "WebRadioGroup"
            oDesc("type").Value = "radio"
            For each item in DictObjectProperties
                oDesc(item).Value = DictObjectProperties(item)
            Next
            
        Case "WEBLIST"
            oDesc("micclass").Value = "WebList"
            oDesc("select type").Value = "ComboBox Select"
            For each item in DictObjectProperties
                oDesc(item).Value = DictObjectProperties(item)
            Next
        
    End Select
    
    Set fnObjectWithDescriptiveProgram = Description.Create
    fnObjectWithDescriptiveProgram = oDesc
    
End Function

[UFT] Get text into DIV through HTML tag

$
0
0
Hi,
I have this element.
[Image: uft_yaweb_spy_html.PNG]

I would like to take the text into WebElement object so i wrote:
Code:
txt = Browser("YA Web").Page("YA Web").WebElement("html tag:=CAPTION").GetROProperty("innerText")
I skipped the WebTable object because in the repository the WebElement was inserted as child of YaWeb Page.

UFT not finds this object into my application:
"The "[WebElement]" object's description matches more than one of the object currently displayed in your application. etc...."

Why?

Thanks a lot.

Running UFT scripts on a remote machine with no UFT installed on the Remote machine

$
0
0
I have a requirement and it goes like this.
I have UFT installed on my system and there is a Remote Machine with no UFT. I want to run the UFT scripts written for a SAP GUI on my local system's UFT but the script should launch the SAP GUI and perform all the recorded actions on the RDP where UFT is not installed.

Is this possible?


Thanks

Unable to recognize objects in SilverLight application through QTP

$
0
0
Hi All,

I am automating silverlight application. I am unable to get the unique properties of objects in SilverLight application. 

When I spy for an object on silverlight object, Hierarchy of the objects adding in OR is changing continuously and I am getting all the objects with the same properties.

Can any one suggest how to automate these objects.


Regards,
Pavan

How to extract perticular digit from a string

$
0
0
Hello,

I want to extract only particular digits from a string in qtp.
Below is the example

mystring  = "3/3"
i need to get only digits which are before "/"

Please help

Regards
Amit

Unable to use array in QTP

$
0
0
Hello,

I have converted a string into an array using below function.

Function SpliteStringToArray(mystring, delimiter, outputArray)

    myArray = split(mystring, delimiter)

    For i = Lbound(myArray) to Ubound(myArray)
      outputArray = myArray(i)
    Next

End Function


But after calling the function, i am not able to use the outputArray.

Call SpliteStringToArray("amit/qtp", "/", Array1)
print Array1(1)

It gived error as type mismatch.
Please help


Regards
Amit

What are different types of Function we define in UFT?

$
0
0
Hello,

In UFT we define Functions as below

Public Function Fun()

End Function

Function Fun()

End Function

Sub Fun()

End Sub

What is basic difference between these?


Regards
Amit

UFT script to interface with JIRA

$
0
0
Hi,

Could some one help me to understand how UFT can interface with JIRA using API

Thanks,
Radhakrishna

[UFT] SwfToolbar > error for to get the text

$
0
0
Hi,
i'm working on an application windows forms based.

I have a statusStrip with text inside.

1) With Object Spy, when I check manually the property, the field text and regexpwndtitle are empty.

2) If I used SwfToolbar("statusStrip").GetRoProperty("text") is empty

3) If I used SwfToolbar("statusStrip").GetVisibileText, UFT returns me a wrong list of chars.

For I can continue I had to use GetContent()

Why I have this wrong situazione?

Thanks.

[UFT] Close opened folder

$
0
0
Hi,
how can I close one or more folder opened in my session?

For to open a new folder I used:
Code:
SystemUtil.Run "explorer.exe", "c:\"

but for close it o other folders not opened by me?

If I think to use:
Code:
'SystemUtil.CloseProcessByName "explorer.exe"

The system asked me if I want to shutdown

Thanks.

[UFT][JSON] Validate Json file

$
0
0
Hi,
in UFT which is the better way for to validate JSON file?

I'm trying with http://www.jsonlint.com, but I not found the way for to put in the text in textarea.

Thanks.

qtp query ,pls help me

$
0
0
hello sir,
im facing problem with my code in qtp keyword driven frame work.

each time i run my script ,it throws an general run error and im unable to click on any links in web applications mainly with,

Set FindObject=obj(0)

 please help me to solve this, i have attached the code here,

Function FindObject(ObjectName)
   Set Desc=Description.Create

For ObjNumber=1 to DataTable.GetSheet("OR").GetRowCount
DataTable.GetSheet("OR").SetCurrentRow(ObjNumber)
If DataTable("name","OR")=ObjectName Then

If DataTable("micclass","OR")<>"" Then
Desc("micclass").value=DataTable("micclass","OR")
End If

    If DataTable("html_id","OR")<>"" Then
Desc("html id").Value=DataTable("html_id","OR")
End If

If DataTable("class","OR")<>"" Then
Desc("class").value=DataTable("class","OR")
End If

    If DataTable("innertext","OR")<>"" Then
Desc("innertext").Value=DataTable("innertext","OR")
End If

If DataTable("value","OR")<>"" Then
Desc("value").Value=DataTable("value","OR")
End If


    Set Obj=Browser("creationtime:=0").Page("title:=.*").ChildObjects(Desc)
    Set FindObject=Obj(0)

  End If
Next
End Function

error in qtp

$
0
0
M getting this error number -2147467259 in qtp wat does it mean plzzz any one help me

verify that parent properties match object currently displayed in your application.

$
0
0
when i am running following code (for ex):
     

systemutil.Run("http://relevantcodes.com/category/qtp/")

Browser("title :=QTP-UFT","index :=0").Page("title:=QTP-UFT","index:=2").Link("name:=QTP-UFT", "innertext:=QTP-UFT").Click


i am getting an error:
Cannot find the "[ Link ]" object's parent "[ Browser ]" (class Browser).
Verify that parent properties match an object currently displayed in your application.

Line (4): "Browser("title :=QTP-UFT","index :=0").Page("title:=QTP-UFT","index:=2").Link("name:=QTP-UFT", "innertext:=QTP-UFT").Click". 

please help me with this issue

cannot create java virtual machine on QTP 12.02 version

$
0
0
Hello

Java application(1.6) was working fine until UFT/QTP version 11.5
But with upgraded QTP version to 12.02 its throwing the error "cannot create java virtual machine"
With some modifications like removing the environmental variables _JAVA_OPTIONS etc the pop is gone but still the application is not launched.
Need help !!

Thanks & Regards,
Richa
Viewing all 1653 articles
Browse latest View live