Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QTP not clicking on the flex button
#1
Not Solved
Hi All,

I'm automating a flex application. In my application, I've a browser button which is identifying as flexButton. I need to click on that browser button and then browse a file.

I've written the following code:

Code:
Browser("browser").page("page").FlexApplication("app").FlexTitleWindow("titlewindow").FlexForm("form").FlexButton("Select files to add::Browse...").Click

The click method is not working here. When I user the click method, logically QTP is clicking on the button but the event is not fired. The alternative that I've is to click on mouse co-ordinates. Currently we're using that for the time being.

This issue is specific to this button. All other flexButtons are working fine.

Can anyone suggest me is there any way that I can click on this flexbutton instead of using the co-ordinates which will fail.

as a workaround, I'm using the below function:

Code:
Function fnClickBrowseButton(ObjectHier, XCoOrd, YCoOrd)
    fnClickBrowseButton=False
    set wshObj = createobject("WScript.Shell")
    Set device = createobject("Mercury.DeviceReplay")
    On error resume next
    ObjectHier.SetFocus
    ObjectHier.Click
    wshObj.AppActivate "Dashboard"
    device.MouseClick XCoOrd,YCoOrd, LEFT_MOUSE_BUTTON
    wshObj.SendKeys "{SPACEBAR}"
    set wshObj = nothing
    Set device = nothing
    err.clear
    on error goto 0
    fnClickBrowseButton=True
End Function

Many thanks in advance.
Reply


Messages In This Thread
QTP not clicking on the flex button - by sudheerch - 12-02-2013, 05:27 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Question [HELP]Button no longer works in the transaction ME21N(SAP/QTP) rafaponzio 11 9,603 12-21-2022, 06:08 PM
Last Post: Carlos Veras
  Clicking command button in accesss form mark_cielos24@yahoo.com 1 3,184 05-07-2013, 10:52 PM
Last Post: agarwl.anurag
  Problem with QTP recognition of Flex objects in web-based GUI using Firefox & Chrome nancyanne18 0 2,421 10-25-2012, 08:11 PM
Last Post: nancyanne18
  How to Download a Excel File, while click on Button in qtp 10.0 branjitk 4 4,605 06-06-2012, 06:01 PM
Last Post: branjitk
  Dot Net Factory Button click to run action in QTP nutsndips 1 4,257 06-21-2011, 08:37 PM
Last Post: nutsndips

Forum Jump:


Users browsing this thread: 1 Guest(s)