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

UFT 14.53 not able to record steps of web application

$
0
0
Hello,

I am using UFT 14.53. I am trying to record steps using chrome Version 77.0.3865.90 (Official Build) (64-bit) however UFT does not record any step.
I have  updated chrome extension in chrome://extensions/. and it also shows error. Screen shot has been attached.


[color=var(--cr-secondary-text_-_color)]ID: hkheagicnendeidmgfnaaocibkmiibbo
[color=var(--cr-secondary-text_-_color)]Inspect views[color=var(--cr-link-color)]Agent/Ext/bg-loader.html[/color][/color]
[/color]

Please could you help me?

Thanks and Regards,
Rupesh

.png   CHROME.png (Size: 164.99 KB / Downloads: 1)

problem in getting rowcount

$
0
0
I have added new shhet and imported excel data in that sheet.

 iteration=datatable.GetSheet(3).GetRowCount

There are 4 rows in my sheet. Script is running after 4th iteration taking blank data.

when i displayed total count writing as 'msgbox iteration', it is showing 999 rows

UFT Fails to Open Microsoft Word

$
0
0
In my script, I click a button and within the application under test, once you hit this button, the application opens up a word document.  Sometimes UFT opens up the word document, and sometimes it does not.  It feels like a memory issue within UFT, but I've tried closing the application down and getting back to the exact spot under test....  So far, results are inconsistent.... It never works from the beginning of the script.... sometimes it works when I run from that step.  Sometimes it works when I'm debugging.  However, sometimes it never works.  When I stop the script and just manually go to the application and click the button, it works fine.  So I definitely see this as a problem with UFT.  

Any thoughts?

trying to test that field doesn't have numeric characters

$
0
0
Trying to check if a field "Last" has numeric characters in field, if so to say so. I tried incorporating some code found on line with mine but getting errors. Can anyone help?

**Below is My Code to test field is blank , this part works ***
Browser("Browser1").Page("page").WebEdit("WebEdit_2").Set datatable("Last")

Dim ValTxt2, objRegEx, colMatches
ValTxt2= Browser("Browser1").Page("page").WebEdit("WebEdit_2").GetROProperty("value")

If ValTxt2="" Then

Browser("Browser2").Page("page2").Output CheckPoint("browser3")

Else
*************************************************

** downloaded code below is giving the trouble when trying to incorporate with top code**
objRegEx.Global = True

objRegEx.Pattern = “[0-9]”


strSearchString = ValTxt2


Set colMatches = objRegEx.Execute(strSearchString)  


If colMatches.Count > 0 Then

    Wscript.Echo “The following characters are not allowed:”

    For Each strMatch in colMatches

        Wscript.Echo  strMatch.Value

    Next

End If

End If

Help with Select checkbox from data table value

$
0
0
in UFT , I have a data table with column ( "Checkbox) with a Value of 1.

I would like to have that value '1" used to place a check in the checkbox field in my test. 
in the properties of checkbox, when the box is selected, the properties "checked" has a Value of 1 and when unselected a value of 0.


I have :
Browser("A").Page("B").WebList("select_3").WebCheckBox("Checkbox", "checked").Set datatable.Value("Checkbox")


Can anyone assist with this scripting issue??

Unable to Close UFT 14.53 through AOM Object

$
0
0
Hi,

I am using UFT 14.53 Version.

we created AOM Object to launch uft tool and for test execution, and after completion of test execution uft tool needs to closed and start next iteration in the loop.

But after completion of test execution, UFT tool is not closing and UFT is throwing error as 'The operation failed because application is waiting for user input' and with error code 800A03F4

Below is the code for reference:

 Dim App, qtTest, DriverPath
 
 DriverPath = "E:\Automation\Chrome"
 intIterationCnt = 3
 intTestCnt = CInt(InputBox("Please enter the no. of test cases in the Execution Excel Sheet"))
 'intTest = intTestCnt - (intTestCnt Mod 5)
 intCnt = intTestCnt/intIterationCnt


 If InStr(intCnt,".") <> 0 Then
  intCnt = intCnt + 1
 End If

 intTest = Cint(Split(intCnt,".")(0))
 
 Redim QTP_Tests(intTest)

 For ctr = 1 To intTest

  QTP_Tests(ctr) = DriverPath & "\AllModulesExecution\Scripts\DriverScript\CompleteModulesExecution_DriverScript"
  If ctr = intTest Then
   Exit For
  End If
  lb = (ctr*intIterationCnt - intIterationCnt)+1
  ub = ctr*intIterationCnt

  For i = lb to ub
   Set App = CreateObject("QuickTest.Application")
   App.Launch
   App.Visible = True
   'Set QuickTest run options
   App.Options.Run.ImageCaptureForTestResults = "Always"
   App.Options.Run.RunMode = "Normal"
   App.Options.Run.StepExecutionDelay = 0
   App.Options.Run.ViewResults = False
   App.Options.Run.AutoExportReportConfig.AutoExportResults = True
   App.Options.Run.AutoExportReportConfig.StepDetailsReport = True
   App.Options.Run.AutoExportReportConfig.DataTableReport = False
   App.Options.Run.AutoExportReportConfig.LogTrackingReport = False
   App.Options.Run.AutoExportReportConfig.ScreenRecorderReport = True
   App.Options.Run.AutoExportReportConfig.SystemMonitorReport = False
   App.Options.Run.AutoExportReportConfig.ExportLocation = DriverPath & "\AllModulesExecution\Result\TestExecutionResult"
   App.Options.Run.AutoExportReportConfig.UserDefinedXSL = ""
   App.Options.Run.AutoExportReportConfig.StepDetailsReportType = "PDF"
   App.Options.Run.AutoExportReportConfig.StepDetailsReportFormat = "Detailed"
   App.Options.Run.AutoExportReportConfig.ExportForFailedRunsOnly = True
   wscript.sleep 1000
   App.Open QTP_Tests(ctr),True  ' Open the test in read-only mode
   Set qtTest = App.Test
   qtTest.Settings.Run.OnError = "NextStep"
   qtTest.Run ' Run the test
   qtTest.close
   wscript.sleep 1000
   App.Quit
   Set qtTest = Nothing
   Set App = Nothing
   wscript.sleep 1000
  Next
 Next

.png   UFT_error.png (Size: 13.13 KB / Downloads: 2)

DevExpress v15.2 Objects are not identified using UFT 14.53

$
0
0
As per UFT v14.53 product availability matrix,  Dev express v15.1 objects should be identified. My application is developed using Devexpress v15.2 . 

Please let me know if UFT v14.53 supports Devexpress v15.2 objects or not. Is there any alternative to automate Devexpress v15.2 objects using UFT v14.53

Enabling Smart Identification for SAP Gui object

$
0
0
Hi, 

I am facing an issue in automating SAP Gui screen. I am willing to enable the smart identification as enable for SAP screens. 
For That I already made the settings as below. 
  1. De-selection of the checkbox as "disable smart idetification during the run session" in File>Run settings>Run 
  2. In object identification I have manually selected all the SAP related objects and enabled the checkbox as "Enable smart identification" 
But still in object repository when I am adding any object of SAP then the smart identification is showing as false and its disable. 
Kindly help us with your inputs, where I can made some changes to get the objects property as Smart identification enabled.

Object Class Name has changed in New OS(2012 R2)

$
0
0
Dear Sir/Madam,

I am facing issue are facing issue with UFT Object Class Names. We are migrating to new VMS from exiting VDIs in my project and and in new VM we are facing recognition issue with existing Objects. This is not any issue related to object property got changed, the object hierarchy itself got change so it is not recognizing.

We are migrating from OS Windows 7 to Windows 2012 R2.

UFT version used in old and new remote machine is: 14.00 Build 1775
Application:Same version in both OS | Developed in Delphi Environment(Delphi2006)


User Name Object Property in Windows OS 7:-->

"Class Name:=DelphiEdit",
"abs_x:=718",
"abs_y:=340",
"delphi_name:=edtUserName",
"enabled:=True",
"focused:=False",
"height:=24",
"hwnd:=854760",
"nativeclass:=TXEdit",
"regexpwndclass:=TXEdit",
"regexpwndtitle:=",
"rightaligned:=False",
"righttoleftlayout:=False",
"righttoleftreading:=False",
"testobjgentype:=edit box",
"text:=",
"visible:=True",
"width:=313",
"window id:=0",
"windowextendedstyle:=0",
"windowstyle:=1409351872",
"x:=436",
"y:=265"


User Name Object Property in Winodws OS 2012 R2: -->

"Class Name:=DelphiObject",
"abs_x:=719",
"abs_y:=342",
"delphi_name:=edtUserName",
"enabled:=True",
"focused:=False",
"hashscroll:=False",
"hasvscroll:=False",
"height:=24",
"hscrollpagesize:=",
"hscrollposition:=",
"hwnd:=394930",
"leftscrollbar:=False",
"maxhscrollpos:=",
"maxvscrollpos:=",
"minhscrollpos:=",
"minvscrollpos:=",
"nativeclass:=TXEdit",
"object class:=TXEdit",
"regexpwndclass:=TXEdit",
"regexpwndtitle:=",
"rightaligned:=False",
"righttoleftlayout:=False",
"righttoleftreading:=False",
"testobjgentype:=object",
"text:=",
"visible:=True",
"vscrollpagesize:=",
"vscrollposition:=",
"width:=313",
"window id:=0",
"windowextendedstyle:=0",
"windowstyle:=1409351872",
"x:=436",
"y:=269"

Kindly let me know if i need provide more detail. I am waiting for your responses. 


Thanks,
Raj Aryan Singh
Test Automation Eng.

How to Click Button on Wpftable(Windows Application)

$
0
0
HI I am Facing one Issue
Is there any way to click button or Close icon on WpfTable(Windows Application)
Its Identifying as whole table , not identifying as individual objects

VB Scripting

$
0
0
Hi Everyone,

I hope someone can help. I am new to software automation testing and have been assigned a task to automate the testing to this app that is used to provision access to, so as you can imagine there are a lot of "checkboxes". What we have first worked out a descriptive code that goes through the app and works out if any of the "checkboxes" are "checked" and first "unchecks" them, then it goes and "checks" them one by one and reports back any errors if there is any issues.

I am wanting a function that goes into the page after a refresh and that passes a message that indicates a "pass" if they're all "checked" or a "fail" if one of them is "unchecked.

Here is the code so far that does what was mention on the first paragraph:
Code:
unction UDF_ProvisionApp(param_array)
    
Set test = description.Create    
test("micclass").value = "WebElement"
test("acc_name").value =  ".*Access has been granted"
test("visible").value = True
test("html tag").value = "A"

Set applicationitems = browser("creationtime:=0").Page("micclass:=Page").ChildObjects(test)

If applicationitems.count = 0 Then
    ' Nothing is checked
else
    For i = 0 to applicationitems.count - 1
        applicationitems(i).click
        wait(2)
    Next
End If



Set test = description.Create    
test("micclass").value = "WebElement"
test("acc_name").value =  ".*Access has been removed"
test("visible").value = True
test("html tag").value = "A"

Set applicationitems = browser("creationtime:=0").Page("micclass:=Page").ChildObjects(test)

expectedCount = applicationitems.count

For i = 0 to applicationitems.count - 1
    applicationitems(i).click
    wait(2)
Next



Set test = description.Create    
test("micclass").value = "WebElement"
test("acc_name").value =  ".*Access has been granted"
test("visible").value = True
test("html tag").value = "A"

Set applicationitems = browser("creationtime:=0").Page("micclass:=Page").ChildObjects(test)

If applicationitems.count = expectedCount Then
'    msgbox "Passed!"
    
'else
'    msgbox "Failed!"
'End If

    RESULTS.InsertResult GLOBAL_STEP_DESCRIPTION,"Granting application access","Granting application access - Success" ,"PASS"
else
    RESULTS.InsertResult GLOBAL_STEP_DESCRIPTION,"Granting application access","Granting application access - Error" ,"FAIL"
End if

End Function

Split Function

$
0
0
I want to separate string and number separately from this text
"outertext:=​ A number 23756467 ​ B number 21900553 C Number 12345678 ​ D Software 23756464 ​ E Number 22018790 PCB 23756465 "

expected o/p
A number 23756467
B number 21900553
C Number 12345678..

How do i write a script for this?
Please suggest

Identify and Count the columns in the datatable

$
0
0
Hi

My problem is - I have several columns in the data-table beginning with Product_ID, like Product_ID2, Product_ID3, Product_ID4, etc. and it can be upto Product_IDn
In that case, I want to count the total no. of occurrences of Product_ID, and capture the value of 'n'
Kindly let me know how to do it?

Thanks
Bhuvaneshwari Dharmaraj

Multiple rows of test data

$
0
0
Dear Experts
Need help


I have created a function to -

1. Count the total no. of rows in a webtable, and then,

2. Dynamically creating a column in the global sheet, and then
3. Adding the value of the count (Step#1), in the column created above (Step#2)


Now when I have to execute multiple rows of test-data, this is working for the first row of data (say, column A1 is successfully populated with the count)
For the 2nd row, what happens is it is overriding the value written in A1, instead of writing the value in A2

Thanks
Bhuvaneshwari Dharmaraj

Reading Global Sheet's DataTable Value

$
0
0
Dear Experts
Need help in order to - convert a datatable value (cell value) to a string

I m adding a column dynamically (in global sheet), and entering a value in it, for e.g., column Name - BHUVANA, and the value entered in the datatable cell; (i.e. BHUVANA columns 1st row) say BHUVANA1 is - XYZ

Now the problem is when I try to access the value (XYZ) in BHUVANA1, then it is considering it as numeric/integer value, and hence unable to access/get the value
Pls. help

Thanks

String Array Declaration

$
0
0
Dear Experts
Need help

I have worked in Peoplecode (which is nothing but a Ctrl-C+Ctrl-V) of Java, but new novice to VB Script and QTP UFT

My requirement is - I need to declare a string array, enter the values in it based on a 'For-Next' loop and then later, again retrieve the values
Can anyone kindly provide the syntax for the same
Its very urgent

Any help is appreciated

Kindly note - I did google and got the syntax for the following -
Dim myArray()
ReDim myArray(1) 'Initialize the array


But not sure how to store & retrieve the values of the array

Kindly reply ASAP
Many Thanks
Bhuvaneshwari Dharmaraj

Replay Start Error

$
0
0
Dear Experts
Need Help

We are on UFT 14.52, and IE11
Often I get a 'Replay Start' error - Enable third party browser extensions

The problem is, say for e.g., today - I enable the third party browser extensions and trigger the UFT scripts, everything is fine
Then tomorrow when I again trigger, scripts run fine, but overall result is Fail due to 'Replay Start' error - Enable third party browser extensions

Do I need to manually enable this everytime/everyday/before each & every run ?
The thing is - after I get this error & when I verify in IE settings, its not enabled and I have to do it manually

Is there any solution / pointer for this
Kindly reply ASAP

Thanks
Bhuvana D

Fifth word from every thousand line in notepad files.

$
0
0
Hi

I have thousands of line in the notepad file and I want fifth word of every line in the notepad. What will be the possible solution for that .

Windows Application Custom Combo box selection change event not firing in uft

$
0
0
Hi All,

I can able to select an item from custom combo box but in application combo box selection change event not fired. please help me on this.

my code as below

VbWindow("frmMDI").VbWindow("frmARPayments").ActiveX("SSTab").ActiveX("TCIComboBox.tcb").VbComboBox("cboClient").Select "Client Name1"

VbWindow("frmMDI").VbWindow("frmARPayments").ActiveX("SSTab").ActiveX("TCIComboBox.tcb").VbComboBox("cboClient").Select "Client Name2"

changed from Client Name1 to Client Name2, but windows application not fired selectionChanged event

Thanks in advance
Ram

Using SAPGuiTable).SetCellData to Active cell.

$
0
0
Using an SAPGuiTable where my code sets the cell that the data needs to go in, however .SetCellData r, "Char. Value",CharVal  "r" is a value set when iterating a DataTable and does not always much the same row that maybe needed in the SAPGuiTable.  Is there a way to SetCellData to the active cell?  or do I need to harvest what the current location is, set it to "r"?  Looking for some guidance on how to do this.  Please advise and thanks.

Code:
    ConFigList = Datatable.GetSheet("ConFig").GetRowCount
    For r = 1 To ConFigList
        Datatable.GetSheet("ConFig").SetCurrentRow(r)
        CharDes = Datatable.Value("Chardescription","ConFig")
        CharVal = Datatable.Value("CharValue","ConFig")
        SAPGuiSession("Session").SAPGuiWindow("Create Corrections Order:_2").SAPGuiButton("Find Char.").Click 'Find dynamically finds the row I need.
        SAPGuiSession("Session").SAPGuiWindow("Position on Characteristc").SAPGuiEdit("Characteristic").Set CharDes
        SAPGuiSession("Session").SAPGuiWindow("Position on Characteristc").SAPGuiEdit("Maximum Number of Hits:").Set "1"
        SAPGuiSession("Session").SAPGuiWindow("Position on Characteristc").SAPGuiButton("Continue   (Enter)").Click
        SAPGuiSession("Session").SAPGuiWindow("Create Corrections Order:_2").SAPGuiTable("SAPLCEI0CHARACTER_VALUES").SetCellData r,"Char. Value",CharVal
        ' r is the row that is in the DataTable, but not the row that was choosen in the Find Char.
        SAPGuiSession("Session").SAPGuiWindow("Create Corrections Order:_2").SendKey ENTER
    Next
Viewing all 1793 articles
Browse latest View live