Part 10: Usages Of Javascripts In Selenium: How To Capture Screenshot Of Entire Web Page

Hello Folks, When we capture screenshot using "TakesScreenshot" interface in selenium webdriver, it captures only visible area of webpage in browser, not entire web page. Sometimes, you need to capture entire web page for test result proof or for validation at later stage. In this post, I will explain how can we capture a web … Continue reading Part 10: Usages Of Javascripts In Selenium: How To Capture Screenshot Of Entire Web Page

Part 9: Usages Of Javascripts In Selenium: How To Scroll Page By Page In Selenium WebDriver Using Javascript

Hello Folks, In last post, we have learnt to scroll a web page by pixels. In this post, we will see how to scroll a web page , page by page. What is page in Web page? Follow below steps: Open browser and load url "http://makeseleniumeasy.com/". Wait till page is loaded. Now press Key "Page … Continue reading Part 9: Usages Of Javascripts In Selenium: How To Scroll Page By Page In Selenium WebDriver Using Javascript

Part 8: Usages Of Javascripts In Selenium: How To Scroll Web Page In Selenium WebDriver Using Javascript

Hello Folks, In last post, we learnt about methods of Javascript which are used to scroll a web page. In this post, we will see usage of those methods in selenium webdriver. Scroll web page using scrollTo method: Selenium webdriver provides an inbuilt method called executeScript to execute any javascript command. We will use same methods … Continue reading Part 8: Usages Of Javascripts In Selenium: How To Scroll Web Page In Selenium WebDriver Using Javascript

Part 7: Usages Of Javascripts In Selenium: Difference Among ScrollBy, ScrollTo and Scroll Methods Of Javascript

Hello Folks, While automating, you may encounter issues as below: Element is not clickable, other element would receive click. Screenshot of required web element is not captured. Element is not visible while element is present in DOM. Unable to capture screen of whole web page vertically or horizontally. All these problems could be solved using … Continue reading Part 7: Usages Of Javascripts In Selenium: Difference Among ScrollBy, ScrollTo and Scroll Methods Of Javascript

Part 6: Usages Of Javascripts In Selenium: Locating WebElements Using JavaScript Commands

Hello Folks, In this post, We will learn about javascript commands which we can use to locate a web element on web page. When to use javascript commands to locate web element? We already have enough locators in Selenium webdriver, which help us in identifying web elements on a web page. But sometimes, these locating strategies … Continue reading Part 6: Usages Of Javascripts In Selenium: Locating WebElements Using JavaScript Commands

Part 5: Usages Of Javascripts In Selenium: Understanding Method executeAsyncScript Of JavascriptExecutor

Hello folks, In last post we have learnt about executeScript methods of JavascriptExecutor interface. There is another method called executeAsyncScript in JavascriptExecutor interface which is not frequently used. But we must be aware about it usage so that we can use whenever required. First let's learn what is Synchronous and Asynchronous? In very simple words, Synchronous = Blocking … Continue reading Part 5: Usages Of Javascripts In Selenium: Understanding Method executeAsyncScript Of JavascriptExecutor

Part 4: Usages Of Javascripts In Selenium: Understanding Method executeScript Of JavascriptExecutor

Hello folks, In this post, we will learn about method executeScript of JavascriptExecutor interface. JavascriptExecutor interface provides two methods to execute JavaScript commands. executeScript : To execute synchronized JavaScript script commands executeAsyncScript: To execute asynchronous JavaScript commands We will learn about "executeScript " method in this post. Synatx: java.lang.Object executeScript(java.lang.String script,java.lang.Object... args) As per selenium doc, above method executes JavaScript in the context of … Continue reading Part 4: Usages Of Javascripts In Selenium: Understanding Method executeScript Of JavascriptExecutor

Part 3: Usages Of Javascripts In Selenium: Problem You Might Face While Executing Javascript Commands In Selenium

Hello Folks, In this post, I will explain a problem which beginner in selenium may encounter and you don't know how to resolve it. I have also faced the same issue and after lot of googling , I found the solution. When you try to execute any javascript command, you might see error message as … Continue reading Part 3: Usages Of Javascripts In Selenium: Problem You Might Face While Executing Javascript Commands In Selenium

Part 2: Usages Of Javascripts In Selenium: How To Run Javascript Commands In Selenium

Hello folks, In previous post, we have learnt why do we need javascript in Selenium webdriver.  In this post we will learn how to run javascript commands in selenium webdriver. Selenium people provides an interface named "JavascriptExecutor", which provides declaration of two methods as below: Object executeScript(String arg0, Object... arg1); Object executeAsyncScript(String arg0, Object... arg1); … Continue reading Part 2: Usages Of Javascripts In Selenium: How To Run Javascript Commands In Selenium

Part 1: Usages Of Javascripts In Selenium: Why We Need Javascript Commands In Selenium

Hello Folks, We will see series of posts on Usage of JavaScripts in Selenium. Let's start with basics. What is JavaScript? Definition from JS offical website: "JavaScript ("JS" for short) is a full-fledged dynamic programming language that, when applied to an HTML document, can provide dynamic interactivity on websites." I hope you should be aware of basic js. If not, you can … Continue reading Part 1: Usages Of Javascripts In Selenium: Why We Need Javascript Commands In Selenium