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.

Improving of sahi - set browser language

MarSilMarSil Members
edited November -1 in Sahi - Open Source
Hi Narayan,

I have improving of sahi. I wanted some property value which could set the language of displayed pages. I didn't find. So I degub the sources of sahi and add some lines into the code which change the language in a http request.

So here are the changes if you want. :)

1. in the method modifyForFetch() of class HttpRequest.java:
added lines

removeHeader("Accept-Language");
addHeader("Accept-Language", language);


2. the "language" is a static variable of the class. The language is set in the sahi.properties by variable like "browser.language=en"


Best regards,
Martin
Sign In or Register to comment.