18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

To fetch one char from _div tag passed parameter

chethshettychethshetty Members
edited February 2013 in Sahi - Open Source
guys i have an issue,

Here i have to get the text from the div "5 following" as every time the count keep incrementing i need to fetch the number from the text.

Here is my code:
var $one=_getText(_div("5 FOLLOWING"));//Here i have entered the name of the _div that is used in website.
var $two=$one.substring(1,1);
_click(_div($two+FOLLOWING));

IS This code correct?

Can anyone solve this issue ?

Answers

  • gaveyomgaveyom Members
    edited February 2013
    Hi chethshetty,

    hope below code will helpful for you

    
    var $one=_getText(_div("5 FOLLOWING"));//Here i have entered the name of the _div that is used in website.
    var $two=$one.substring(0,1);
    var $divID = $two+"FOLLOWING";
    _click(_div($divID));
    
    
Sign In or Register to comment.