Forum Discussion

damodara_visist's avatar
damodara_visist
Occasional Contributor
11 years ago

Unable to click on the objects or text in Document Viewer!!

When I spy the report object, I get below code:



Sys.Process("ClientFrameWork").WinFormsObject("ReportViewerForm")

.WinFormsObject("reportViewer1").WinFormsObject("printControl1")

.WinFormsObject("DocumentViewer")



Actually I need to validate text in documentviewer and click on text avialble in document viewer. But I am unable todo, could you please help me in this scenario.



Regards,

Damodar
  • sbkeenan's avatar
    sbkeenan
    Frequent Contributor
    Hi Damodar



    I've recently had some 'fun' with a Dev Express Document Viewer control.  What I've discovered is that if you select the 'SelectedPage' property, you will see a 'Bricks' property and from there view the 'Text' of each brick.  This 'Text' property stores the content of an element within the document.  All you need to do is to determine which brick you need to reference in your test.



    Hope this is of some help.



    Regards

    Stephen.
  • damodara_visist's avatar
    damodara_visist
    Occasional Contributor
    Any luck! I am waiting for response!!



    The control is devexpress control, below is the class name of the object:



    DevExpress.XtraPrinting.Native.WinControls.ViewControl





    Regards,

    Damodar