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.

usage of setBrowserJS()

madanmadan Members
edited November -1 in Sahi - Open Source
Hi,

As the code mentioned below I am able to execute javascript using selenium

driver.get("http://www.eviltester.com/selenium/basic_ajax.html";);

JavascriptExecutor js = (JavascriptExecutor) driver;

String script ="document.getElementById('lteq30').value=24;"; //This is for the textbox

js.executeScript(script);

If i am using the same code for sahi(as mentioned below) its not working(not throwing any error)

browser.setBrowserJS("document.getElementById('lteq30').value=24;");

Is there any other method to inject javaScript
Sign In or Register to comment.