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.

How to Copy last 8 character of url or string

sandeepgautam43sandeepgautam43 Members
edited November -1 in Sahi - Open Source
I have generate the url from Stub on page:

http://test.com/home?test619036

here i want to copy this test619036 text from above and want to store in variable.

Comments

  • Hi sandeepgautam43,

    You can use this:

    var url = location.href;
    _alert(url.split('?')[1]);

    Regards
    Sumitra
Sign In or Register to comment.