webdriver

Select item inside a react-select dropdown list in Selenium with Python

|▌冷眼眸甩不掉的悲伤 提交于 2021-01-29 08:26:08
问题 Link example website here In that website, I am looking how to select item (e.g "Green") in "Single" dropdown box and "Grouped" dropdown box. I tried to click to dropdown first and tried to find the element inside it to click but I can't Do you have any idea? and with Grouped dropdown I even couldn't find the xpath to click on it Thank in advance driver = webdriver.Chrome() driver.get("https://react-select.com/home") driver.maximize_window() driver.implicitly_wait(20) driver.find_element_by

Waiting until text to be present in element is NOT the string provided

匆匆过客 提交于 2021-01-29 05:41:52
问题 I'm looking for a way to have selenium webdriver wait until the text present in the element location I'm interested is NOT the string provided in the code below. wait.until(ExpectedConditions.textToBePresentInElementLocated(By.xpath("//*[@id=\"order-details\"]/div[2]/div/dl/dd[1]/div"),"Completed successfully")); I'm looking for a way where the "text to be present" is not "Completed successfully" so that the code can move forward and no longer wait 回答1: You can try with ExpectedConditions -

java.lang.NoSuchMethodError: com.google.gson.GsonBuilder.setLenient()Lcom/google/gson/GsonBuilder;

拟墨画扇 提交于 2021-01-29 05:30:28
问题 When I try to create a RemoteWebDriver in 3.11, I see this error below. This worked fine up through 3.10. I've reverted to 3.10 for now. I tried adding in the gson jar from google, but I still see same error. Anyone else see this? I'm running one selenium server as hub, and then running a node against it with webdriver for ff or chrome, same issue. com.google.gson.GsonBuilder.setLenient()Lcom/google/gson/GsonBuilder; java.lang.NoSuchMethodError: com.google.gson.GsonBuilder.setLenient()Lcom

Why does Selenium get the child elements slowly

可紊 提交于 2021-01-29 02:13:21
问题 For example, HTML: <input type="hidden" name="ie" value="utf-8"> this element don't have child element, when I use code: List<WebElement> childElements = ele.findElements(By.xpath("./*")); the program uses a very long time (about 30s) return a result. And the result size is right which is zero. So how can I resolve this problem? Thanks. 回答1: As per the documentation findElements() method is affected by the implicit wait duration in force at the time of execution. When implicitly waiting,

Need help for webdriver and Javascript for a hidden File upload element

江枫思渺然 提交于 2021-01-29 02:11:41
问题 I am trying to automate a file upload scenario in a client web application. The code of the entire file upload form looks like this <td valign="top"> <iframe id="batchLoad:inputFile:uploadFrame" class="iceInpFile" width="600px" scrolling="no" height="30px" frameborder="0" title="Input File Frame" style="border-collapse:collapse; border-spacing:0px; padding:0px;" src="/hip-webapp/block/resource/LTExMzg4MjQzMTY=/" name="batchLoad:inputFile:uploadFrame" marginwidth="0" marginheight="0"

Need help for webdriver and Javascript for a hidden File upload element

烈酒焚心 提交于 2021-01-29 02:07:12
问题 I am trying to automate a file upload scenario in a client web application. The code of the entire file upload form looks like this <td valign="top"> <iframe id="batchLoad:inputFile:uploadFrame" class="iceInpFile" width="600px" scrolling="no" height="30px" frameborder="0" title="Input File Frame" style="border-collapse:collapse; border-spacing:0px; padding:0px;" src="/hip-webapp/block/resource/LTExMzg4MjQzMTY=/" name="batchLoad:inputFile:uploadFrame" marginwidth="0" marginheight="0"

Unable to select value from autocomplete using protractor

六月ゝ 毕业季﹏ 提交于 2021-01-28 18:37:12
问题 <select name="Name" class="metaselect ignore" style="display: none;" xpath="1"> <option value="00000000-0000-0000-0000-000000000000" selected="selected">-- New --</option> <option value="bd434f35-90db-e911-aa59-a96c125b4266">AddtoTest</option> <option value="e8b6fd1b-e2f3-e911-aa64-e16c52c442dc">APINV_EPIC06</option> <option value="35cfdd50-c47a-e911-aa37-8fe9ba6f0d87">Approve</option> <option value="70da50aa-e2a3-e911-aa45-8f65b76e1edb">Basic</option> <option value="5af85ad8-5ac0-e911-aa4f

Unable to select value from autocomplete using protractor

百般思念 提交于 2021-01-28 18:31:10
问题 <select name="Name" class="metaselect ignore" style="display: none;" xpath="1"> <option value="00000000-0000-0000-0000-000000000000" selected="selected">-- New --</option> <option value="bd434f35-90db-e911-aa59-a96c125b4266">AddtoTest</option> <option value="e8b6fd1b-e2f3-e911-aa64-e16c52c442dc">APINV_EPIC06</option> <option value="35cfdd50-c47a-e911-aa37-8fe9ba6f0d87">Approve</option> <option value="70da50aa-e2a3-e911-aa45-8f65b76e1edb">Basic</option> <option value="5af85ad8-5ac0-e911-aa4f

How can i auto login sahibinden.com

£可爱£侵袭症+ 提交于 2021-01-28 11:30:20
问题 if soyunmaDolabi < 3: from selenium import webdriver import time browser = webdriver.Chrome(r"C:\Users\Dell\Desktop\lol/chromedriver.exe") browser.get("https://sahibinden.com") popUp = browser.find_element_by_xpath("//*[@id='container']/div[3]/div/aside/div[1]/nav/ul[2]/li[1]") LogIn= browser.find_element_by_xpath("/html/body/div[3]/div[1]/ul/li[1]/a") time.sleep(2) popUp.click() time.sleep(2) LogIn.click() kadi = browser.find_element_by_xpath("//*[@id='username']") password = browser.find

System.InvalidOperationException : Error forwarding the new session cannot find : Capabilities {browserName: chrome, marionette: false}

蹲街弑〆低调 提交于 2021-01-28 09:06:25
问题 I am trying to run my Selenium C# automated test using Grid . When i run the test I get the error: Message: System.InvalidOperationException : Error forwarding the new session cannot find : Capabilities {browserName: chrome, marionette: false, platform: WINDOWS} I have chromedriver.exe in the following directory: F:\Selenium Projects\C#\Grid practice\automation\ I have set the path for Environment Variables from System, Control Panel to the path: F:\Selenium Projects\C#\Grid practice