Forum Discussion

Kanika's avatar
Kanika
Contributor
10 years ago

Not able to click on forward pagination button in a panel.

 I want to click on forward button (in pagination icons) to go on second page through VBScript

1.png

But object spy only able to focus on panel in which they are present but cannot directly focus on fast forward button.

2.png

When use developer tool to identify fast forward button getting below details

3.png

 

My Script :

Able to identify panel with below code:

       page1=array("ObjectType" , "className", "VisibleOnScreen")

       page2=array("Panel", "pager", "True")

       Set pageobj=page.Find(page1,page2,1500)

 

 

But not able to identify fast forward object with below code:

 

       Test1 = array("className")

       Test2 = array("icon-forward")

       Set Test3 = page.Find(Test1,Test2,1500)

 

Please let me know how can I identify fast forward button and can click that? I am using IE8.

  • Hi,

     

    I would suggest that you use the FindChildByXPath method for this. Here is an example:

     

    Set panel = page.FindChildByXPath("//DIV[@class='pager']", False)
    If Not panel is Nothing Then 
      Set  objF = panel.FindChildByXPath("//SPAN[@class='icon-forward']", False)     
      ' …
    Else
    

     

    Please refer to the "Finding Web Objects Using XPath Expressions" ( http://smartbear.com/viewarticle/62117/ )  help topic for details. 

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi,

     

    I would suggest that you use the FindChildByXPath method for this. Here is an example:

     

    Set panel = page.FindChildByXPath("//DIV[@class='pager']", False)
    If Not panel is Nothing Then 
      Set  objF = panel.FindChildByXPath("//SPAN[@class='icon-forward']", False)     
      ' …
    Else
    

     

    Please refer to the "Finding Web Objects Using XPath Expressions" ( http://smartbear.com/viewarticle/62117/ )  help topic for details. 

    • Kanika's avatar
      Kanika
      Contributor

      Wow. Its working!!

       

      Great thanks :)