Search Results for

    Show / Hide Table of Contents

    Class CommonMethods

    Add on to reduce Test case scripting

    Inheritance
    System.Object
    CommonMethods
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Quark.XA.Core.AutomationProject
    Assembly: Quark.XA.Core.AutomationProject.dll
    Syntax
    public class CommonMethods

    Constructors

    CommonMethods(ref Application)

    Declaration
    public CommonMethods(ref Application application)
    Parameters
    Type Name Description
    Application application

    Properties

    Dialogs

    Declaration
    public Dialogs Dialogs { get; }
    Property Value
    Type Description
    Dialogs

    XmlAuthor

    Declaration
    public XmlAuthor XmlAuthor { get; }
    Property Value
    Type Description
    XmlAuthor

    Methods

    AcceptRejectPerformance(String, String)

    Declaration
    public void AcceptRejectPerformance(string TestDoc, string AcceptReject)
    Parameters
    Type Name Description
    System.String TestDoc
    System.String AcceptReject

    ActionUndoRedoVerification(String, String, Int32, Int32, Int32, Boolean, Boolean, Boolean)

    Verify Action, then perform undo/Redo and corresponding verifications

    Declaration
    public void ActionUndoRedoVerification(string TestCaseFileName, string Action = "Menu", int UndoCount = 1, int RedoCount = 1, int delaytime = 5000, bool newfile = false, bool Reopen = true, bool CloseDoc = true)
    Parameters
    Type Name Description
    System.String TestCaseFileName

    File Name to save with

    System.String Action

    Undo/redo to be performed by menu or shortcut, default is menu

    System.Int32 UndoCount

    Count of undo action, default is 1

    System.Int32 RedoCount

    Count of redo action, default is 1

    System.Int32 delaytime
    System.Boolean newfile
    System.Boolean Reopen
    System.Boolean CloseDoc

    AddBodyTextWithContent()

    Insert Bodytext with demo text

    Declaration
    public void AddBodyTextWithContent()

    AddBulletedListWithContent()

    Add Lists with demo content

    Declaration
    public void AddBulletedListWithContent()

    AddHtmlTableWithContent(Int32, Int32, Int32)

    Add HTML Table with Paragraph elements and text

    Declaration
    public void AddHtmlTableWithContent(int column, int rows, int indexpositionofTable)
    Parameters
    Type Name Description
    System.Int32 column

    Number of Columns

    System.Int32 rows

    Number of Rows

    System.Int32 indexpositionofTable

    Position of Table on Document

    AddNoteWithContent()

    Insert Note with demo text

    Declaration
    public void AddNoteWithContent()

    AddNumberedListWithContent()

    Declaration
    public void AddNumberedListWithContent()

    AddQuoteWithContent()

    Insert Note with demo text

    Declaration
    public void AddQuoteWithContent()

    AddSimpleListWithContent()

    Declaration
    public void AddSimpleListWithContent()

    AddTableWithContent(Int32, Int32, Int32)

    Add Table with Paragraph elements and text

    Declaration
    public void AddTableWithContent(int column, int rows, int indexpositionofTable)
    Parameters
    Type Name Description
    System.Int32 column

    Number of Columns

    System.Int32 rows

    Number of Rows

    System.Int32 indexpositionofTable

    Position of Table on Document

    AddXMLAttrib(XmlNode, String[])

    Declaration
    public void AddXMLAttrib(XmlNode node, params string[] attributeList)
    Parameters
    Type Name Description
    System.Xml.XmlNode node
    System.String[] attributeList

    AddXMLAttribValue(String, String, Boolean, Boolean, Boolean, String[])

    Declaration
    public void AddXMLAttribValue(string fileName, string xPath, bool TempDOCTYPE = true, bool DocLoad = true, bool TmpRoot = false, params string[] attributeList)
    Parameters
    Type Name Description
    System.String fileName
    System.String xPath
    System.Boolean TempDOCTYPE
    System.Boolean DocLoad
    System.Boolean TmpRoot
    System.String[] attributeList

    ChangeConfigFile(String, String, String, Boolean, Boolean)

    Change any config file of build with some other customized config file and revert back changed file at the end of testcase

    Declaration
    public void ChangeConfigFile(string destFile, string renameFile, string sourceFile = null, bool delete = false, bool relaunch = true)
    Parameters
    Type Name Description
    System.String destFile

    destination path with file name to paste copied file

    System.String renameFile
    System.String sourceFile

    source file (customized file) name with path to copy

    System.Boolean delete
    System.Boolean relaunch

    ChangeToPerformance(String, String)

    Declaration
    public void ChangeToPerformance(string TestDoc, string StartWord)
    Parameters
    Type Name Description
    System.String TestDoc
    System.String StartWord

    ClearReviewModifiedAttribute()

    Declaration
    public void ClearReviewModifiedAttribute()

    ClosePane()

    Declaration
    public void ClosePane()

    CommentXMLNode(String, String, String, String, Boolean, Boolean, Boolean)

    Declaration
    public void CommentXMLNode(string fileName, string xPath, string commentorUncomment, string attrib = null, bool TempDOCTYPE = true, bool DocLoad = true, bool TmpRoot = false)
    Parameters
    Type Name Description
    System.String fileName
    System.String xPath
    System.String commentorUncomment
    System.String attrib
    System.Boolean TempDOCTYPE
    System.Boolean DocLoad
    System.Boolean TmpRoot

    ConfigureDocx()

    Declaration
    public void ConfigureDocx()

    ConfigureEmbeddedImages()

    Declaration
    public void ConfigureEmbeddedImages()

    CopyPastePerformance(String, Boolean, String, Boolean)

    Declaration
    public void CopyPastePerformance(string TestDoc, bool NotEmpty, string CopyPasteUndoRedo, bool smartPaste = false)
    Parameters
    Type Name Description
    System.String TestDoc
    System.Boolean NotEmpty
    System.String CopyPasteUndoRedo
    System.Boolean smartPaste

    CreateFromTestDocument(CommonMethods.TestDocumentType, String, String)

    Declaration
    public void CreateFromTestDocument(CommonMethods.TestDocumentType testDocumentType, string testCaseName, string testDocumentName)
    Parameters
    Type Name Description
    CommonMethods.TestDocumentType testDocumentType
    System.String testCaseName
    System.String testDocumentName

    CreateTestFileForDocx()

    Declaration
    public void CreateTestFileForDocx()

    DismissAlerts()

    Declaration
    public void DismissAlerts()

    EnableClosePaneKeyConfig()

    Declaration
    public void EnableClosePaneKeyConfig()

    EscCommentPane()

    Declaration
    public void EscCommentPane()

    FileCopyToTestSource(String)

    Declaration
    public void FileCopyToTestSource(string TestDoc)
    Parameters
    Type Name Description
    System.String TestDoc

    FindReplacePerformance(String)

    Declaration
    public void FindReplacePerformance(string TestDoc)
    Parameters
    Type Name Description
    System.String TestDoc

    InputNoteOption(String)

    Insert Note Number

    Declaration
    public void InputNoteOption(string noteoption)
    Parameters
    Type Name Description
    System.String noteoption

    Number

    InsertDOCTYPE(String)

    Declaration
    public void InsertDOCTYPE(string fileName)
    Parameters
    Type Name Description
    System.String fileName

    InsertDocxFlag()

    Declaration
    public void InsertDocxFlag()

    InsertEquationUsingContextMenu(String, Boolean)

    Declaration
    public void InsertEquationUsingContextMenu(string EquationType = "Block", bool edit = false)
    Parameters
    Type Name Description
    System.String EquationType
    System.Boolean edit

    InsertPictureUsingContextMenu(String, String, Boolean)

    Insert a picture using context menu

    Declaration
    public void InsertPictureUsingContextMenu(string pictureName, string PictureType = "Block", bool ribbon = false)
    Parameters
    Type Name Description
    System.String pictureName

    Name of Picture in Test Documents

    System.String PictureType
    System.Boolean ribbon

    InsertRemovePageBreak(String)

    Declaration
    public void InsertRemovePageBreak(string TestCaseFileName)
    Parameters
    Type Name Description
    System.String TestCaseFileName

    InsertTmpRoot(String)

    Declaration
    public void InsertTmpRoot(string fileName)
    Parameters
    Type Name Description
    System.String fileName

    InsertXMLNode(String, String, String, String, Boolean, Boolean, Boolean, Boolean)

    Declaration
    public void InsertXMLNode(string fileName, string xPath, string newChild, string refChild = null, bool AddDuplicateNode = false, bool TempDOCTYPE = true, bool DocLoad = true, bool TmpRoot = false)
    Parameters
    Type Name Description
    System.String fileName
    System.String xPath
    System.String newChild
    System.String refChild
    System.Boolean AddDuplicateNode
    System.Boolean TempDOCTYPE
    System.Boolean DocLoad
    System.Boolean TmpRoot

    InsertXref(String, String, String, String, String, String, String, Boolean, Boolean)

    Declaration
    public void InsertXref(string sourcetext, string targettext, string sourcecomponent_type, string TestCaseFileName, string select, string selectiontype = "with", string targetcomponent = "Body Text", bool newfile = false, bool TC = false)
    Parameters
    Type Name Description
    System.String sourcetext
    System.String targettext
    System.String sourcecomponent_type
    System.String TestCaseFileName
    System.String select
    System.String selectiontype
    System.String targetcomponent
    System.Boolean newfile
    System.Boolean TC

    IsControlEnabled(UIItem)

    Declaration
    public static bool IsControlEnabled(UIItem controlName)
    Parameters
    Type Name Description
    UIItem controlName
    Returns
    Type Description
    System.Boolean

    IsControlVisible(UIItem)

    Declaration
    public static bool IsControlVisible(UIItem controlName)
    Parameters
    Type Name Description
    UIItem controlName
    Returns
    Type Description
    System.Boolean

    MapUnmapNetworkDrive(String, String)

    Map and unmap network drive

    Declaration
    public void MapUnmapNetworkDrive(string mapOrUnmap, string path = null)
    Parameters
    Type Name Description
    System.String mapOrUnmap

    specify Map or Unmap

    System.String path

    path to map or unmap

    OpenDocFromDocumentRecoveryWin(String, String)

    Double click document in document recovery window to open

    Declaration
    public void OpenDocFromDocumentRecoveryWin(string documentName, string recoverytype = "[Original]")
    Parameters
    Type Name Description
    System.String documentName

    document name to open

    System.String recoverytype

    OpenPerformance(String)

    Declaration
    public void OpenPerformance(string TestDoc)
    Parameters
    Type Name Description
    System.String TestDoc

    RemoveAttrib(XmlNode, String[])

    Removes specified attributes from XML

    Declaration
    public void RemoveAttrib(XmlNode node, params string[] attrib)
    Parameters
    Type Name Description
    System.Xml.XmlNode node

    XML node to traverse

    System.String[] attrib

    RemoveDOCTYPE(String)

    Declaration
    public void RemoveDOCTYPE(string fileName)
    Parameters
    Type Name Description
    System.String fileName

    RemoveTmpRoot(String)

    Declaration
    public void RemoveTmpRoot(string fileName)
    Parameters
    Type Name Description
    System.String fileName

    RemoveXMLAttributes(String, String, String[])

    Removes specified attributes from XML

    Declaration
    public void RemoveXMLAttributes(string sourcefileName, string destfileName = null, params string[] attribute)
    Parameters
    Type Name Description
    System.String sourcefileName

    source XML to edit

    System.String destfileName

    destination xml to save after editing

    System.String[] attribute

    attributes list to remove

    RemoveXMLAttributesByXPath(String, String, Boolean, Boolean, Boolean, String[])

    Declaration
    public void RemoveXMLAttributesByXPath(string fileName, string xPath, bool TempDOCTYPE = true, bool DocLoad = true, bool TmpRoot = false, params string[] attributeList)
    Parameters
    Type Name Description
    System.String fileName
    System.String xPath
    System.Boolean TempDOCTYPE
    System.Boolean DocLoad
    System.Boolean TmpRoot
    System.String[] attributeList

    RemoveXMLNode(String, String, Boolean, Boolean, Boolean)

    Declaration
    public void RemoveXMLNode(string fileName, string xPath, bool TempDOCTYPE = true, bool DocLoad = true, bool TmpRoot = false)
    Parameters
    Type Name Description
    System.String fileName
    System.String xPath
    System.Boolean TempDOCTYPE
    System.Boolean DocLoad
    System.Boolean TmpRoot

    ReplacePictureUsingContextMenu(String, Boolean)

    Repalce a picture (block and inline both) using context menu Added by jbhatnagar 2 Mar 2015

    Declaration
    public void ReplacePictureUsingContextMenu(string pictureName, bool UsingMouse = true)
    Parameters
    Type Name Description
    System.String pictureName

    Name of Picture in Test Documents

    System.Boolean UsingMouse

    ReplaceXMLAttrib(XmlNode, String[])

    Declaration
    public void ReplaceXMLAttrib(XmlNode node, params string[] attributeList)
    Parameters
    Type Name Description
    System.Xml.XmlNode node
    System.String[] attributeList

    ReplaceXMLAttribValue(String, String, Boolean, Boolean, Boolean, String[])

    Declaration
    public void ReplaceXMLAttribValue(string fileName, string xPath, bool TempDOCTYPE = true, bool DocLoad = true, bool TmpRoot = false, params string[] attributeList)
    Parameters
    Type Name Description
    System.String fileName
    System.String xPath
    System.Boolean TempDOCTYPE
    System.Boolean DocLoad
    System.Boolean TmpRoot
    System.String[] attributeList

    ReplaceXMLNode(String, String, String, String, Boolean, Boolean, Boolean)

    Declaration
    public void ReplaceXMLNode(string fileName, string xPath, string originalVal = null, string replaceVal = null, bool TempDOCTYPE = true, bool DocLoad = true, bool TmpRoot = false)
    Parameters
    Type Name Description
    System.String fileName
    System.String xPath
    System.String originalVal
    System.String replaceVal
    System.Boolean TempDOCTYPE
    System.Boolean DocLoad
    System.Boolean TmpRoot

    RevertDocx()

    Declaration
    public void RevertDocx()

    RevertEmbeddedImageChanges()

    Declaration
    public void RevertEmbeddedImageChanges()

    ReviewWorkflow(String, String)

    Declaration
    public void ReviewWorkflow(string ForExport, string TestCaseFileName)
    Parameters
    Type Name Description
    System.String ForExport
    System.String TestCaseFileName

    RunMacro(String)

    Declaration
    public void RunMacro(string MacroName)
    Parameters
    Type Name Description
    System.String MacroName

    SavePerformance(String, Boolean)

    Declaration
    public void SavePerformance(string TestDoc, bool SaveAs = false)
    Parameters
    Type Name Description
    System.String TestDoc
    System.Boolean SaveAs

    SetConfigFlag(String, String)

    Declaration
    public void SetConfigFlag(string attrib, string FlagVal)
    Parameters
    Type Name Description
    System.String attrib
    System.String FlagVal

    SetCrossRefConfig(String)

    Declaration
    public void SetCrossRefConfig(string customtextreadonly = "false")
    Parameters
    Type Name Description
    System.String customtextreadonly

    SetListNumbering(String)

    Declaration
    public void SetListNumbering(string NumbValue)
    Parameters
    Type Name Description
    System.String NumbValue

    TablePerformance(String, String)

    Declaration
    public void TablePerformance(string TestDoc, string TableAction)
    Parameters
    Type Name Description
    System.String TestDoc
    System.String TableAction

    ToggleCF(String)

    Declaration
    public void ToggleCF(string TestDoc)
    Parameters
    Type Name Description
    System.String TestDoc

    VerifyControlExists(UIItem)

    Recorded Controls Verification

    Declaration
    public static bool VerifyControlExists(UIItem controlname)
    Parameters
    Type Name Description
    UIItem controlname
    Returns
    Type Description
    System.Boolean

    VerifyControlReady(UIItem)

    Declaration
    public static bool VerifyControlReady(UIItem controlName)
    Parameters
    Type Name Description
    UIItem controlName
    Returns
    Type Description
    System.Boolean

    VerifyDialogue(String)

    Declaration
    public bool VerifyDialogue(string text)
    Parameters
    Type Name Description
    System.String text
    Returns
    Type Description
    System.Boolean

    VerifyDialogueExistAndClose(String)

    Declaration
    public void VerifyDialogueExistAndClose(string dialogueName)
    Parameters
    Type Name Description
    System.String dialogueName

    verifyReference(String, String, String)

    Added to click and verify Cross reference target added by jbhatnagar 10 Mar 2015

    Declaration
    public void verifyReference(string refer, string refertype = "intra", string ContentType = "Text")
    Parameters
    Type Name Description
    System.String refer
    System.String refertype
    System.String ContentType
    In This Article
    Back to top © 2025 Quark Software Inc. All rights reserved.