Skip to main content

Posts

Showing posts from January, 2021

JavaScript- Highlighting the element and creating Alert

         Java Script Executor. Javascript is an interface that helps to execute javascript through Selenium Webdriver If the locators like Xpath and css do not work then you can use Java script executor, you can use javascript  to  highlight element and to create alerts and handle dynamic ID's Syntax is as below. JavascriptExecutor js = (JavascriptExecutor) driver; js.executeScript(Script,Arguments);   JavaScriptExecutor Methods executeAsyncScript With Asynchronous script, your page renders more quickly. Instead of forcing users to wait for a script to download before the page renders. This function will execute an asynchronous piece of JavaScript in the context of the currently selected frame or window in Selenium. The JS so executed is single-threaded with a various callback function which runs synchronously.  executeScript This method executes JavaScript in the context of the currently selected frame or window in Selenium. The script use...

Working with Sikuli

  Sikuli depends on processing of images and  can automate flash object and desktop application  It   is mainly used for interacting with elements of webpages and handling windows based popups  Sikuli uses the technique of "Image Recognition" and "Control GUI" to interact with elements of web pages and windows popups, all web elements are  taken as image and stored inside project. 1. if you want to upload a desktop file/image on the website. 2. You can run and change setting on your YouTube channel add dependency of Sikuli in your POM  file and Sikuli jar will be added in you Maven dependencies  <dependency>     <groupId>org.sikuli</groupId>     <artifactId> sikuli - api </artifactId>     <version>1.2.0</version> </dependency> Automating Flash objects Let's take example of automating a  Youtube  video using Sikuli. after opening the video lets suppose...