Debomita Bhattacharjee has Published 863 Articles

How to click on a hyper link using linkText in Selenium?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 03-Apr-2021 10:34:42

10K+ Views

A hyperlink on a page is identified with the anchor tag. To click a link, we can use the link text locator which matches the text enclosed within the anchor tag.We can also use the partial link text locator which matches the text enclosed within the anchor tag partially. NoSuchElementException ... Read More

How to get typed text from a textbox by using Selenium Webdriver?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 03-Apr-2021 10:34:18

3K+ Views

We can get the typed text from a textbox with Selenium webdriver. Firstly, we have to enter text in the text box (after being identified with any locators) with the help of the sendKeys method.Then apply the method getAttribute to obtain the text entered in that field and pass the ... Read More

How to get text found between span – Selenium

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 03-Apr-2021 10:33:55

4K+ Views

We can get the text found within the span tag with Selenium webdriver.The text of a web element can be captured with the method getText. Let us see an example of an element having the text - © Copyright 2021. All Rights Reserved enclosed within the span tag.SyntaxWebElement l = ... Read More

How to specify "ENTER" button functionality in Selenium WebDriver code?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 03-Apr-2021 10:26:42

4K+ Views

To specify ENTER button functionality in Selenium webdriver we have to use the method sendKeys. To simulate pressing the ENTER button, we have to add the statement import org.openqa.selenium.Keys to our code.Then pass the parameter – Keys.RETURN or Keys.ENTER to the sendKeys method.Let us make an attempt to press the ... Read More

How to print text from a list of all web elements with same class name in Selenium?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 03-Apr-2021 10:20:38

6K+ Views

We can get the text from a list of all web elements with the same class name in Selenium webdriver. We can use any of the locators like the class name with method By.className, xpath with method By.xpath, or css with method By.cssSelector.Let us verify a xpath expression //h2[@class='store-name'] which ... Read More

Gecko driver, Selecting value from a dropdown list using Selenium

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 03-Apr-2021 10:19:27

502 Views

We can use the Selenium webdriver scripts in Firefox (versions>47) with the help of the geckodriver.exe executable file. First, we have to download this file from the following link −https://github.com/mozilla/geckodriver/releasesOnce we navigate to the mentioned URL, we have to click a link based on the operating system (Windows, Linux or ... Read More

How can I select date from a datepicker div using Selenium Webdriver?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 03-Apr-2021 10:14:00

2K+ Views

We can select data from a datepicker using Selenium webdriver. A datepicker in a calendar can be designed in numerous ways on the web UI. Based on the UI, we have to design our test.A calendar may have a dropdown for selection of day, month or year. It may also ... Read More

How to use JavaScript in Selenium to click an Element?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 03-Apr-2021 10:13:08

12K+ Views

We can use the JavaScript Executor in Selenium to click an element.Selenium can execute JavaScript commands with the help of the method executeScript.Sometimes while clicking a link, we get the IllegalStateException, to avoid this exception, the JavaScript executor is used instead of the method click. The parameters to be passed ... Read More

How can I scroll a web page using selenium webdriver in python?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 16-Feb-2021 06:49:03

3K+ Views

Sometimes we need to perform action on an element which is not present in the viewable area of the page. We need to scroll down to the page in order to reach that element.Selenium cannot perform scrolling action directly. This can be achieved with the help of Javascript Executor and ... Read More

How do I use Selenium with Ruby?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 02-Feb-2021 12:41:54

2K+ Views

We can use Selenium with Ruby. First of all we have to install Ruby in the system. For installation in Windows, we have to take the help of the RubyInstaller package by navigating to the link −https://rubyinstaller.org/Click on Download.The various versions of Ruby Installers links get displayed. Select the latest ... Read More

Advertisements