Posts

Showing posts from August, 2019

What is JavascriptExecutor in Selenium?

Image
In Selenium Webdriver, locators like ID, Name, XPath, CSS, etc. are used to identify and perform operations on a web page. And there are certain cases when these locators do not work. Here I am talking about some examples and these are from my first-hand experience. Let's get started- Case 1: In this case, we talk about elements that show up on UI and works fine when interacted manually but not using code. You cannot reach these elements in desired or conventional ways and performs actions on them using the locators in Selenium. Like, a click action on a radio button or a checkbox or a normal button. What you see in the below screenshot is one such button named Publish. This element is not interactable when we approach it with any kind of locator in Selenium. But manually it works as expected. Well, that’s a different story of how this happened. This is a low priority issue because the element is behaving as expected when tested manually. So we are not bothered to