Found 190 Articles for Selenium Web Driver

Limitations of Selenium Webdriver

Siva Sai
Updated on 18-Jul-2023 13:33:50

385 Views

Web testing has undergone a revolution thanks to Selenium WebDriver, a potent technology. This open-source framework is crucial to web application testing since it enables developers to automate browsers. Selenium WebDriver does have some restrictions, though, much as any tool. In order to better comprehend these restrictions, this article explores them and offers specific instances. Please be aware that while this article describes the limitations of Selenium WebDriver, it does not discount the enormous value and flexibility that it provides to developers all over the world. The Selenium WebDriver: A Brief Overview A component of the Selenium Suite called Selenium ... Read More

Applications and Uses of Selenium WebDriver

Priya Mishra
Updated on 24-Jul-2023 18:28:25

77 Views

Selenium WebDriver, a powerful open-source framework, revolutionizes web automation and testing and there are many applications and uses of Selenium in different feilds. This article explores the myriad applications and uses of Selenium WebDriver, catering to developers and quality assurance professionals alike. With its cross-platform compatibility, WebDriver allows seamless testing across various browsers and operating systems. From automating repetitive tasks to conducting complex test scenarios, it empowers teams to achieve faster and more reliable web application testing. Additionally, Selenium WebDriver's robust API facilitates integration with programming languages, enabling enhanced customization and extensibility. Discover the limitless potential of Selenium WebDriver ... Read More

How to obtain the tagname of the parent element in Selenium webdriver?

Debomita Bhattacharjee
Updated on 22-Nov-2021 11:38:56

2K+ Views

We can obtain the tagname of the parent element in Selenium webdriver. First of all, we need to identify the child element with help of any of the locators like id, class, name, xpath, or CSS. Then we have to identify the parent with the findElement(By.xpath()) method.We can identify the parent from the child, by localizing it with the child and then passing (parent::*) as a parameter to the findElement(By.xpath()). Next, to get the tagname of the parent, we have to use the getTagName() method.Syntaxchild.findElement(By.xpath("parent::*"));Let us identify tagname of the parent of child element li in the below html code ... Read More

How to obtain the page title using Selenium webdriver?

Debomita Bhattacharjee
Updated on 22-Nov-2021 11:34:51

8K+ Views

We can obtain the page title using Selenium webdriver. The method getTitle() is used to obtain the present page title and then we can get the result in the console.Syntaxt = driver.getTitle();Let us find the title of the current page. We shall get About Careers at Tutorials Point – Tutorialspoint as output.ExampleCode Implementation.import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; import java.util.concurrent.TimeUnit; public class PageTitle{    public static void main(String[] args) {       System.setProperty("webdriver.chrome.driver",       "C:\Users\ghs6kor\Desktop\Java\chromedriver.exe");       //implicit wait       driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);       WebDriver driver = new ChromeDriver(); ... Read More

How to handle frames in Selenium Webdriver in Python?

Debomita Bhattacharjee
Updated on 22-Nov-2021 11:21:12

592 Views

We can handle frames in Selenium webdriver in Python. An iframe is identified with a tag in an html document. An iframe is an html document containing elements that reside inside another html document. Let us see an html document of a frame.The following methods help to switch between iframes −switch_to.frame(args) – The frame index is put as an argument to the method. The starting index of the iframe is 0.Syntaxdriver.switch_to.frame(0), switching to the first iframe.switch_to.frame(args) - The frame name or id is put as an argument to the method.Syntaxdriver.switch_to.frame("nm"), switching to the iframe with name nm.switch_to.frame(args) - The ... Read More

How to interact with hidden elements in Selenium Webdriver?

Debomita Bhattacharjee
Updated on 22-Nov-2021 11:19:22

12K+ Views

We can interact with hidden elements in Selenium Webdriver. The hidden elements are the ones that are present in the DOM but not visible on the page. Mostly the hidden elements are defined by the CSS property style="display:none;". In case an element is a part of the form tag, it can be hidden by setting the attribute type to the value hidden.Selenium by default cannot handle hidden elements and throws ElementNotVisibleException while working with them. Javascript Executor is used to handle hidden elements on the page. Selenium runs the Javascript commands with the executeScript method. The commands to be run ... Read More

How to get an attribute value of an element in Selenium Webdriver?

Debomita Bhattacharjee
Updated on 22-Nov-2021 11:15:19

6K+ Views

We can get an attribute value of an element in the Selenium Webdriver. This is achieved with the help of the getAttribute method. In an html document, each element is identified with its tagname along with the element attributes with their values. To get an attribute value, we have to pass the element attribute as an argument to the getAttribute method.Let us see the html code of an element and obtain the value of its src attribute. The value of its src attribute shall be /about/images/logo.png.ExampleCode Implementation.import org.openqa.selenium.By; import org.openqa.selenium.Keys; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; import java.util.concurrent.TimeUnit; public class ... Read More

Selenium RC vs Selenium webdriver.

Debomita Bhattacharjee
Updated on 22-Nov-2021 10:46:47

534 Views

The differences between Selenium RC and Webdriver are listed below −FeaturesSelenium WebdriverSelenium RCArchitectureNot acquired from Javascript.Acquired from Javascript.ServerNo server is needed to begin test case execution.The server is needed to begin test case execution.Object- OrientedIt is used widely for object-oriented programming.It is moderately used for object-oriented programming.BrowserIt can test all the leading browsers including execution in headless mode.It can test all the leading browsers.AlertsIt is capable of handling alerts.It is not capable of handling alerts.DropdownIt is capable of handling dropdowns.It is not capable of handling dropdowns.Dynamic LocatorsElements can be located with dynamic locators.Elements cannot be located with dynamic locators.Record and ... Read More

Where to find Selenium Webdriver release notes?

Debomita Bhattacharjee
Updated on 30-Nov-2020 11:02:41

58 Views

We can find the release notes of Selenium webdriver. They reside within the source control under the specific folder for the particular language libraries. Follow the steps one by one −Navigate to the link − http://docs.seleniumhq.org/.Click on the Download tab.Move to the Selenium Client & WebDriver Language Binding section.Click on the Change Log link for each of the languages.

Getting Selenium to pause for X seconds.

Debomita Bhattacharjee
Updated on 30-Nov-2020 10:58:55

2K+ Views

We can get Selenium to pause for X seconds with the concept of synchronization. There are two types of waits − implicit and explicit. Apart from this there is the Thread.sleep method that halts Selenium for a certain time. The wait time is passed as an argument to the method.ExampleCode Implementation with Thread.sleep.import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; public class ThreadWt{    public static void main(String[] args) {       System.setProperty("webdriver.chrome.driver",       "C:\Users\ghs6kor\Desktop\Java\chromedriver.exe");       WebDriver driver = new ChromeDriver();       driver.get("https://www.tutorialspoint.com/index.htm");       // identify element, enter text     ... Read More

1 2 3 4 5 ... 19 Next
Advertisements