Found 519 Articles for Selenium

Create web element driver method in selenium Python

Tamoghna Das
Updated on 25-Apr-2023 17:18:50

761 Views

What is Selenium? One of the most well-known open-source frameworks for automating web browsers is called Selenium. It enables developers and testers to simulate user actions on a web page, such as clicking buttons, filling out forms, and navigating between pages, in order to test web applications or carry out repetitive tasks. For example, this could include clicking "Submit" on a form, clicking "Next" on a page, and so on. There are a number of programming languages that may be used with Selenium, including Python, Java, C#, and JavaScript. In addition to that, it gives users access to a variety ... Read More

Forward driver method – Selenium Python

Atharva Shah
Updated on 18-Apr-2023 12:07:17

448 Views

This technique is used to navigate forward in a web browser's history and allows Selenium to move forward in the browser's history page executing any new navigation commands. This Forward Driver Method in Selenium Python can improve the efficiency and accuracy of your automated testing scripts. which allows you to quickly move between. Setup Firefox Executable Download the Firefox browser installer from here Once downloaded, install the browser and an exe file will be placed automatically in C:\Program Files\Mozilla Firefox\firefox.exe. We will be needing it later. Gecko Driver Windows Users can download the gecko ... Read More

Food Recognition Selenium using Calorie Mama API

Atharva Shah
Updated on 18-Apr-2023 12:05:18

276 Views

An open-source program used to automate web browsers is called Selenium Webdriver. It offers a platform-independent testing framework for web applications on many platforms and browsers. With the use of deep learning and computer vision algorithms, the food identification API Caloriemama can recognise different foods and their nutritional values from a single photograph. In this guide, we'll look at how the Selenium Webdriver automates the process of uploading photographs and retrieving the results, making it simple for developers to include food recognition functionality into their apps and provide consumers with correct nutritional information. Setup Firefox Executable Download the ... Read More

Action Chains in Selenium Python

Rohan Singh
Updated on 17-Apr-2023 09:42:54

4K+ Views

Action chains in selenium python are the execution of multiple browser actions together in sequence. Selenium is a popular open-source automation testing tool used to test web applications and automate browser actions. Selenium can chain multiple browser actions together and this chaining of multiple actions is known as Action chains. In this article, we will discuss what action chains are in selenium python and how to use action chains to automate our web testing. What are Action Chains in Selenium Python? Action chains are a sequence of actions that are performed in a specific order on a web page to ... Read More

How to get rid of Firefox logging in Selenium?

Debomita Bhattacharjee
Updated on 08-Feb-2022 10:44:56

2K+ Views

After the execution of tests, there are logs generated because of Firefox logging in with geckodriver. This log generation by Firefox can be disabled by certain parameters setting.We can stop these logs from being recorded in the console and capture them in a different file. This is achieved with the help of the System.setProperty method. In the above image, we can see the geckodriver logs generated in the console.SyntaxSystem.setProperty(FirefoxDriver.SystemProperty.DRIVER_USE_MARIONETTE, "true"); // turning off logs System.setProperty(FirefoxDriver.SystemProperty.BROWSER_LOGFILE, ""); // record logs in another fileExampleimport org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.firefox.FirefoxDriver; import java.util.concurrent.TimeUnit; public class LogsDisable{    public static void main(String[] ... Read More

How to determine colors using Selenium?

Debomita Bhattacharjee
Updated on 08-Feb-2022 10:30:22

863 Views

Selenium has the color conversion support class. We have to add the statement from selenium.webdriver.support.color import Color to convert colors to rgba/hex format.Examplefrom selenium import webdriver from selenium.webdriver.support.color import Color #color conversion to rgba format print(Color.from_string('#00fe37').rgba) #color conversion to hex format print(Color.from_string('rgb(1, 200, 5)').hex) #color conversion to rgba format print(Color.from_string('green').rgba)Output

What are the Actions class in Selenium?

Debomita Bhattacharjee
Updated on 08-Feb-2022 11:03:54

520 Views

Selenium can perform mouse movements, keypress, hovering on an element, drag and drop actions, and so on with the help of the ActionsChains class. We have to create an instance of the ActionChains class which shall hold all actions in a queue.Then the method - perform is invoked which actually performs the tasks in the order in which they are queued. We have to add the statement from selenium.webdriver import ActionChains to work with the ActionChains class.Syntax#Method 1 - chained pattern e =driver.find_element_by_css_selector(".txt") a = ActionChains(driver) a.move_to_element(e).click().perform() #Method 2 - queued actions one after another ... Read More

How to use CSS selector as a locator in Selenium?

Debomita Bhattacharjee
Updated on 08-Feb-2022 10:59:14

949 Views

We can locate elements with locator CSS Selector in Selenium webdriver. The general expression to create a CSS expression is tagname[attribute='value']. We can utilize the id and class attributes to create a CSS.With id, the syntax of a CSS expression is tagname#id. For instance, for a CSS expression - input#txt-loc, input is the tagname and the txt-loc is the value of the id attribute.With class name, the syntax of a CSS expression is tagname.class. For instance, for a CSS expression - input.txt-cls, input is the tagname and the txt-cls is the value of the class attribute.If there are n sub-elements(children) ... Read More

How to get the total number of radio buttons on a page using Selenium?

Debomita Bhattacharjee
Updated on 19-Nov-2021 11:58:10

1K+ Views

We can get the total number of radio buttons on a page using Selenium webdriver using the find_elements method. While working on any radio buttons, we will always find an attribute type in the html code and its value should be radio.This characteristic is only applicable to radio buttons on that particular page and to no other types of UI elements like edit box, link, and so on.To retrieve all the elements with attribute type = 'radio', we will use find_elements_by_xpath() method. This method returns a list of web elements with the type of xpath specified in the method argument. ... Read More

How to get the total number of checkboxes in a page using Selenium?

Debomita Bhattacharjee
Updated on 19-Nov-2021 11:55:54

2K+ Views

We can get the total number of checkboxes in a page using Selenium webdriver using find_elements method. While working on any checkboxes, we will always find an attribute type in the html code and its value should be checkbox.This characteristic is only applicable to checkboxes on that particular page and no other types of UI elements like edit box, link and so on.To retrieve all the elements with attribute type = 'checkbox', we will use find_elements_by_xpath() method. This method returns a list of web elements with the type of xpath specified in the method argument. In case there are no ... Read More

Previous 1 ... 4 5 6 7 8 ... 52 Next
Advertisements