Posts

Showing posts from 2015

Webdriver with Javascript to validate SVG Canvas objects like Charts

JavaScript in Webdriver Sometimes Webdriver does not help to find objects and their properties. We can develop Javascript functions and inject them via Webdriver.   It is good to develop Javascript and inject via Web driver to validate SVG Canvas objects like Charts. Webdriver provide a “JavascriptExecutor “class for executing java script. First you need to create “JavascriptExecutor” class object. JavascriptExecutor js = (JavascriptExecutor) driver; Now call “executeScript()” method by passing java script code as a argument. js .executeScript(“java script code”) Here are some more examples. String readyState = (String)js.executeScript("return document.readyState"); String title = (String)js.executeScript("return document.title"); String domain = (String)js.executeScript("return document.domain"); WebElement el   = (WebElement)js.executeScript("return document.getElementById('rentc');...

Popular posts from this blog

Testing Shifts with agile automation #RPA #ML

Need > Want

Bots and What Not !!

Automate your everyday tedious tasks and free up time for higher-value work (with Microsoft free RPA solution)

Respect is not earned, It is given ⚘ 🙏