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

How to check Checkbox in SSDBGrid in windows application

$
0
0
Hi All,

Could you please help us to check / uncheck checkbox which are in SSDBGrid in Windows Application(developed in VB6.0).
please find my code as below

 VbWindow("frmMDI").VbWindow("frmFreqAllocation").AcxTable("Available Frequency").SetCellData(RowNo,ColumnNo,1) ' 1 for check

UFT is checked in checkbox in SSDBGrid but Application not identify check box status as checked.


Thanks in advance
Ram

UFT issues with Outsystems dynamically generated Id/names

$
0
0
Good evening all,   I was recently given a large number of UFT scripts to maintain (and very little training on how to do so).   One of the scripts is for a webpage developed on the Outsystems platform.  Outsystems dynamically generated ids and names for elements on the web screens and every time a new version is published many of the names/ids change.   I'm trying to determine if there is some way I can update these scripts so when the name changes my scripts won't continually break.

Below is an example of an input field that we use in the script.   Last month It was OutsystemsUIWeb_wt16 this month it changed to 17.   My assumption is each time there is a new release that value will continue to increment.   I notice that every month the name and Id both end with wtUserNameInput but I can't figure out a way to only look at that portion of the name or Id in my script.   I tried just saying *.wtUserNameInput but when the script runs the input is not found.   Any suggestions?

name="OutSystemsUIWeb_wt16$block$wtLogin$OutSystemsUIWeb_wt17$block$wtLogin$OutSystemsUIWeb_wt28$block$wtInput$wtUserNameInput" type="text" id="OutSystemsUIWeb_wt16_block_wtLogin_OutSystemsUIWeb_wt17_block_wtLogin_OutSystemsUIWeb_wt28_block_wtInput_wtUserNameInput" tabindex="5"

Cannot Get UFT One/UFT 15 To Run

$
0
0
We have just upgraded to UFT 15 (UFT One) at work.

I am not a record and play UFT developer.  We do testing of our in-house web apps.  I simply start a new project and go to Record and Playback settings and set my URL and Browser and then I use Object Spy and the Repository.  I identify, save and then usually rename any objects to our naming conventions.  Then I will program something like this (just an example):


Code:
Do
Loop While Browser("name of my browser").Page("name of my page").WebEdit("fldUserLogin").Exist = False
Browser("name of my browser").Page("name of my page").WebEdit("fldUserLogin").Set DataTable("Username", dtGlobalSheet)

Do
Loop While Browser("name of my browser").Page("name of my page").WebEdit("fldPassword").Exist = False
Browser("name of my browser").Page("name of my page").WebEdit("fldPassword").Set DataTable("Password", dtGlobalSheet)

Do
Loop While Browser("name of my browser").Page("name of my page").WebButton("btnLogin").Exist = False
Browser("name of my browser").Page("name of my page").WebButton("btnLogin").Click
 
Yes this is very simple way of doing it, but it worked for UFT 12 through 14.
Now when I run this in UFT One (UFT 15) it does not error, but it also does absolutely nothing.  I have no indication that it ran at all.  It must be a new setting that I need to tweak that I am not familiar with in UFT One.  
I also noticed when I create a New project, I do have the Record icon and the option to add a recording.  As soon as I begin to code as above, the Record icon goes away and so does any menu option to record.   I get instead, a Capture icon which looks like the Record icon circle with lines radiating out at N,S,E and W of the circle like the scope of a gun.
If someone can just give me some help getting my first script to run in any mode but preferably Run Maintenance mode, I would appreciate it very much.
Thank you,
Zune  Smile

Cisco IPS Specialist’s Job Description

$
0
0
Cisco security professionals have to manage all security equipment, such as the Cisco ASA, IDS/IPS devices of Cisco. They have to promptly act when alerts arrive by examining potential security and data issues.

Specialists must review switches, routers, and firewall configurations. They need to work with the different teams, such as telephony team, systems administrators, and application owners of business units, to come up with IT solutions to tackle threats to their business.

Send automatic email notification when test run started

$
0
0
Hi is there a way to do this in UFT? Since I find it hard to find in ALM side. Thank you in advance.

How to Check for the existance of multiple objects

$
0
0
Hi Team,

    Maximum number of Web elements on a page is 3 ie, A, B and C. I just wanted to check for the existence of each using descriptive programming

The logic is , If A exists i need to check for the B and if B exists i need to check for C.

Can someone please let me know how to find a solution.?

Intermittent Pausing On One Object

$
0
0
My company has an in-house web application that I test.  When a user enters an account number and clicks the Search button, data is displayed on the page about the account. Our database has over 2 millions records and my boss noticed that two fields on this page are occasionally displaying values that are impossible if "field a" is something, "field b" has to be 1 of 3 items and it actually has a value that is not one of these 3 possible values. He had me write a script that does the following:

Opens a text file with all the account numbers (I actually broke these into twenty 100,000 accounts each files)
Enters the account number
Clicks Search
Reads values
Writes values to a pipe delimited file
Repeats for 100,000 iterations

I am running it in Fast Mode. It's very simple and it was working great and we were cruising through. 

Now, intermittently, it will be going along very well and it gets to reading the second object and it pauses for a long time.  A couple minutes or so and then goes on for awhile, fine and again pauses.  When it pauses, the data it writes just for that field is blank.  The other field is correct.

I wrote Print statements on every line in my code after it completed that line so I can see where the pause is.  It is always on the 2nd field.

All of my fields happen to be dropdown boxes.  They are grayed out but they have values selected.  I stop it when it is pauses and open the Object Repository and check that field and the "value" and "selected" are what they should be and are never blank.

I added "value" and "selection" to the Description Properties along with name and html tag that were already there.
I made Enable Smart Identification = False

It works perfectly most of the time, but lately it pauses like this on about every 8th iteration and saves nothing for this field only.  Other fields are fine.  It pauses for a couple minutes and then will proceed, but picks up a null for that field it paused on.

I can see by my Print outputs that this "field b" is the step it pauses on but I cannot figure out why. It is the same type as "field a" but it never pauses on "field a" nor does it leave "field a" value as null. The data populated in the field when it pauses is always different.  I thought maybe one particular value was causing the issue but that is not the case.  

I have tried in my code to get  GetROProperty("selection") and  GetROProperty("value") which are always the same value when I check them in the Object Repository.  It doesn't matter if I get "selection" or "value" the pause still happens.

Does anyone have any suggestions so I can get past this obstacle?

Thank you.

External Library in GIT

$
0
0
Hello, I am just working with the UFT tool and your videos are very good. !! Thanks a lot!!
Currently I have a challenge, which is to upload a Test to Git with external libraries, but every time I access the test, it is impossible to execute it, since the libraries are referenced with the Absolute path. I would like to know if this has been presented to you and they know how to approach this problem or any suggestion. Any help is welcome. From already thank you very much

UFT Version:14.51

If Then Is Always True For Web Objects

$
0
0
With our web testing automation, we do a lot of repetitive testing and occasionally, I guess due to poor development or whatever, we get redirected to a 404 page or Server Error page or 500 page, etc.  I added objects from each of these pages to the Object Repository and added If Then statements for each of them.

The issue is, when the program comes to the line with the If Then, even though the page is not displayed anywhere, the objects still exist so the If Then is ALWAYS True.

What unique object property can I use in the If Then that will not be True unless the page is actually being displayed?

Thank you.
Smile

Object not found during the 2nd iteration of an Action call in a For loop

$
0
0
I am testing a Salesforce page with two Contacts links on it as shown in the attached mage.

.jpg   contacts.jpg (Size: 167.37 KB / Downloads: 1)
]

I have a loop where I click on each Contact link and its info  shows up in the Contact Profile page.

.jpg   contact_profile.jpg (Size: 244.35 KB / Downloads: 1)

I then call an Action to check various values on that Contact Profile page.
Set oDesc = Description.Create
oDesc("micclass").value = "WebTable"

Set obj = Browser("Contacts | Salesforce").Page("Contacts | Salesforce").ChildObjects(oDesc)
rowCount = obj(0).GetROProperty("rows")
For i = 2 to rowCount
       Set ObjChildItem = obj(0).ChildItem(i,3,"Link", 0)
        ' bring up Contact Profile page                                                                                                                                                  ObjChildItem.Click()       

        ' Valdate values on the Contact Profile page     
         RunAction "ValidateContactProperties", oneIteration
            
  Next
      --------           ValidateContactProperties action --------------------

' select the Details tab on a webstrip (I'm using Google Chrome)
Browser("abc").Page("abc").WebTabStrip("RelatedDetailsNewsMore").Select "Details"
........
 'Go back to the previous page. If you remove this code, only the first contact profile will be displayed in the browser.
   Browser("abc").Back

-----------------------------------------------------
The problem is when ValidateContactProperties is run the 2nd time from the loop, the objects on the Contact Profile page are not being recognized. Possibly the DOM is getting messed up.

How can I fix this?

Remote Agent is possible to execute without ALM

$
0
0
Is it possible to execute Remote Agent witout ALM and it the same machine that is installed UFT?

I want to execute UFT test during long time( some hours) and I read that Remote agent use less resources, but I only install UFT in the machine and not use ALM.

Is it possible to execute Remote Agent witout ALM?

$
0
0
Is it possible to execute Remote Agent witout ALM and it the same machine that is installed UFT?

I want to execute UFT test during long time( some hours) and I read that Remote agent use less resources, but I only install UFT in the machine and not use ALM.

no action on click for particular wpf button

$
0
0
Hi,

I am testing windows based application written in c#. In my test I need to click on button. Action triggered in this case is some button property change e.g.
By default button has text "Yes".
When I click, button text changes to "No".

Button is defined by devname, which is same in both cases and can be found. If I execute button.Click then test is run without error, but no actual action happens.
When I check the element, I can see that in case 1 text and name of the element is "Yes" and in case 2 text and name properties change to "No".
Do you have any hints what can be done to handle this test case?

Thank you.

How to close/restart UFT in "Not responding" status with AOM script

$
0
0
Hi,

I use a UFT project several times for performance test, and I use this AOM script to execute the test 100 iterations, to reduce the UFT load memory, the script will stop and run again UFT each 10 iterations. But in some case , UFT is in "Not Responding" status( Launched but not responding) during the test, and it fails. How can I resolve this issue?

The AOM script is:

Dim qtApp,qtTest, i 
'Create a QuickTest Professional AOM object
Set qtApp = CreateObject("QuickTest.Application")
If Not qtApp.Launched then
StartUFT()
end if

set qtTest = qtApp.Test ' Get access to the test
' Get the current value of the "it_start" environment variable. This is the iteration start index.
itstart = qtTest.Environment.Value("it_start")
' Get the current value of the "it_stop" environment variable. This is the iteration stop index.
itstop = qtTest.Environment.Value("it_stop")
For i = CInt(itstart) To CInt(itstop)

If i Mod 10 = 0 Then
CloseUFT()
End If
If Not qtApp.Launched then
StartUFT()
set qtTest = qtApp.Test
end if
qtTest.Run
Next
CloseUFT()
Set qtTest = Nothing
Set qtApp = Nothing

Function StartUFT()
    qtApp.Launch
qtApp.Visible = True
qtApp.Open "<Path>" 'name of the start up script
qtApp.Options.Run.RunMode = "Fast"
qtApp.Options.Run.ViewResults = False
 End Function
 
 Function CloseUFT()
qtTest.Close
qtApp.quit
 End Function

Can UFT Handle Detecting Redirects?

$
0
0
My script is opening a certain page ( Browser("MyPage1").Page(MyPage1")... ) and then sets a value and clicks a button that refreshes this screen and then I verify values o that screen match.  It does this for several iterations but if the system is ever down for any reason, the user is redirected and my script hangs until I can get it working again the next day.  This is because it redirects to (Browser("RedirPage2").Page(RedirPage2") ). I have tried to put If Thens, Do Whiles, etc. trying to detect this redirect but nothing I do is working. I have tried On Error Resume Next and in the Settings > Run I have tried different On Error settings nothing works for me.  It's not an error that causes this.  The program does respond with a Warning that it cannot find the field it is looking for, but not a failure.  That's why I try to catch this redirect just before it is checking the field values on the refreshed page.

Any suggestions?

Thank you.

Need to input Japanese Character through UFT

$
0
0
Hi Team,

When i try to input Japanese character in Mainframe screen through UFT its entring as ???? instead of Japanese character. Kindly provide the solution for this.

Control to spawned process

$
0
0
We are looking to introduce UFT automation but the pilot has ground to a halt because the legacy system (running on an iSeries terminal) invokes an external data capture process that is web based. 

While UFT handles both sides, has anyone any experience in starting a process on one application (in this case the iSeries) and then switching control to a web page and then switching back to the parent application?

Can UFT do such a thing or do we have to put the first script on hold, invoke another and when that has completed, continue with the first (or even a third)?

QTP API Best Practices

$
0
0
Hello,

I have over 20 years of experience in QTP Automated testing and need to know how a person programming in QTP API converts the business requirements into input parameters for the API.

Any information you share is greatly appreciated. 


Thanks,
wafflehunter

File Pointers Reset When Using Subroutines

$
0
0
I have a text file I am reading line by line that is driving my testing.  I know I could have used the UFT Data area as well but we already have these text files that are easy to read and parse, but are a bit of a pain to export to UFT or Excel. because each line is different. I have a subroutine that reads each line of the file until End of File is reached.  I also have code that based on the line of text read, will jump to another sub-routine and do something and then jump back.  To my surprise and unlike an Excel macro, this is starting my file read over again from the beginning and leading to duplicate tests. What is the best way to fix this issue?

Thank you,
Zune  Cool

virtual objects do not work

$
0
0
Hi!

UFT can not properly recognize all objects in my MS Access app so I have created virtual objects but they still do not work. When I automated another app it was enough to create virtual objects and then again record a test - the objects were seen in repository and the new script included the virtual objects. Now it does not work like before.
Can anybody explain why and if I can do anything?


Agnes
Viewing all 1793 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>