selenium-webdriver

Can selenium recognize aria-uuid as an ID for object recognition?

时光毁灭记忆、已成空白 提交于 2021-02-16 20:20:43
问题 I recently recommended to my devs to add IDs to each element on the project I'm working to make automation more robust, they added in aria-uuid to each element. I cannot get anything to recognize these IDs! I'm wondering if it is even possible? I'm using python/selenium. I've tried identifying elements by ID, I've done CSS selectors and xpaths but they have had a history of breaking between new builds. Relevant html: input class="short ng-valid ng-not-empty ng-valid-min ng-valid-required"

How to resolve java.lang.NullPointerException in Selenium with Cucumber?

a 夏天 提交于 2021-02-16 15:09:26
问题 Register.feature Feature: The Registration Page Background: Given The User is on the Registration Page Scenario: The User Should be able to Register When The User Enters Contact Information And The User Enters Mailing Information When The User Enters User Information ReisterSteps.java public class RegisterSteps { public WebDriver driver; @Given("^The User is on the Registration Page$") public void the_User_is_on_the_Registration_Page() throws Throwable { System.out.println("Background:- The

WebDriverException: disconnected: unable to connect to renderer even on providing correct path of latest chromedriver

我怕爱的太早我们不能终老 提交于 2021-02-16 14:52:37
问题 package Testing_Forum; import java.util.concurrent.TimeUnit; import org.openqa.selenium.PageLoadStrategy; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; public class XTR { public static void main(String arg[]) { System.getProperty("webdriver.chrome.driver,D:\\Important\\chromedriver_win32_important\\chromedriver.exe"); WebDriver driver=new ChromeDriver(); driver.get("https://www.google.com/"); driver.manage().window().maximize(); driver.manage().timeouts

Cannot cast WebElement to org.openqa.selenium.internal.Locatable

混江龙づ霸主 提交于 2021-02-16 14:35:08
问题 I am trying to automate resize a column from a table, by using Actions class this is my code: public boolean resizeColumn(String columnToResize, String toColumn) { try { WebElement column = findElement(columnResize, columnToResize); WebElement moveToPosition = findElement(columnByName, toColumn); waitUntilClickable(column); //click on resize getSupport().clickAndHold(column); .. ... In PageSupport class: public void clickAndHold(WebElement onElement) { Actions actions = new Actions(driver);

Python Selenium: Block-Title is not properly verified. (Magento Cloud)

折月煮酒 提交于 2021-02-16 11:27:52
问题 Details: Currently I am writing within a project based on Magento Cloud test cases with Python-Selenium. So far everything is fine. Currently I only have one problem, which I can't explain anymore. Actually it's only about the verification of a text. Or the verification of a block title within a profile page. I would like to secure multiple times, and thus define 2 different test cases. issues I always get the following message. selenium.common.exceptions.StaleElementReferenceException:

Selenium Find Element Based on String in Text or Attribute

爷,独闯天下 提交于 2021-02-16 04:27:31
问题 I'm trying to have Selenium find an element based on a string that can be contained in the element's text or any attribute, and I'm wondering if there's some wildcard I can implement to capture all this without having to use multi-condition OR logic. What I'm using right now that works is ... driver.findElement(By.xpath("//*[contains(@title,'foobar') or contains(.,'foobar')]")); And I wanted to know if there's a way to use a wildcard instead of the specific attribute (@title) that also

Trying to upload multiple files to a website using Python and Selenium but only the first file is picked up and not the others, any idea why?

老子叫甜甜 提交于 2021-02-15 07:37:26
问题 Theyre actually PGP files but i dont think that matters much Not sure whats wrong with my script, im using Selenium and Glob as the main source of uploading and file manipulation. I have all my files set for variable and i also used the send.keys accurately, not sure why its only picking up the first instance of every file and not all of them. For Example, the directory folder that all of these are pointing too might have 2 or 3 of the "ack" file. When i execute this code it will only pick up

Trying to upload multiple files to a website using Python and Selenium but only the first file is picked up and not the others, any idea why?

百般思念 提交于 2021-02-15 07:37:12
问题 Theyre actually PGP files but i dont think that matters much Not sure whats wrong with my script, im using Selenium and Glob as the main source of uploading and file manipulation. I have all my files set for variable and i also used the send.keys accurately, not sure why its only picking up the first instance of every file and not all of them. For Example, the directory folder that all of these are pointing too might have 2 or 3 of the "ack" file. When i execute this code it will only pick up

Exception has occurred: TypeError 'WebElement' object is not subscriptable

ぐ巨炮叔叔 提交于 2021-02-15 07:35:17
问题 Hello guys I'm really a newbie to python and I just writing a piece of code that opens Whatsapp and you give it the person's name and the message then sends how many times you want. But when I start debugging the code it gives me this: Exception has occurred: TypeError 'WebElement' object is not subscriptable File "E:\Iliya\My Courses\Python\Projects\Whatsapp Robot\Whatsapp_Bot.py", line 15, in <module> msg = driver.find_element_by_class_name('_3FRCZ')[1] # ===================================

Exception has occurred: TypeError 'WebElement' object is not subscriptable

隐身守侯 提交于 2021-02-15 07:34:46
问题 Hello guys I'm really a newbie to python and I just writing a piece of code that opens Whatsapp and you give it the person's name and the message then sends how many times you want. But when I start debugging the code it gives me this: Exception has occurred: TypeError 'WebElement' object is not subscriptable File "E:\Iliya\My Courses\Python\Projects\Whatsapp Robot\Whatsapp_Bot.py", line 15, in <module> msg = driver.find_element_by_class_name('_3FRCZ')[1] # ===================================