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.

Text or Html Scraping using Sahi

shobhitjainshobhitjain Members
edited November -1 in Sahi - Open Source
Hi nayaran,

I was wondering if there is any method or function in sahi through which i can scrape the text or html from the website. basically the website has some dynamic content and i want to check if the text appearing is correct or not . I can use standard software but i want to do this thing using sahi. Just scrape and store somewhere

Comments

  • SumitraSumitra Members
    Hi shobhitjain,

    Can you tell me what exactly you are trying to do?

    Is that you want to check whether the text displayed is correct?

    Try with _assertEqual(expected, actual, message); and check if it helps you.

    Regards
    Sumitra
  • I just want to scrape the text from the webpage and store in my text file
  • SumitraSumitra Members
    Hi shobhitjain,

    You can try doing:

    _getText(element);
    _writeFile(text, filePath[, overwrite]);

    For more details of APIs :

    http://sahi.co.in/w/all-apis

    Regards
    Sumitra
Sign In or Register to comment.