xpath

How to click on the ember.js enabled button using Selenium and Python

断了今生、忘了曾经 提交于 2020-11-29 09:55:10
问题 I have been trying to make this clickable and I just cannot understand what I am doing wrong. I am also trying to induce webdriverwait, so that it is clicked when it appears. This is my code so far: def order(k): driver = webdriver.Chrome(os.getcwd()+"\\webdriver\\chromedriver.exe") driver.get("website.com/login-to-checkout") driver.find_element_by_id('i0116').send_keys(k["email"]) driver.find_element_by_id('i0118').send_keys(k["password"]) driver.find_element_by_id('idSIButton9').click()

How to click on the ember.js enabled button using Selenium and Python

别说谁变了你拦得住时间么 提交于 2020-11-29 09:53:05
问题 I have been trying to make this clickable and I just cannot understand what I am doing wrong. I am also trying to induce webdriverwait, so that it is clicked when it appears. This is my code so far: def order(k): driver = webdriver.Chrome(os.getcwd()+"\\webdriver\\chromedriver.exe") driver.get("website.com/login-to-checkout") driver.find_element_by_id('i0116').send_keys(k["email"]) driver.find_element_by_id('i0118').send_keys(k["password"]) driver.find_element_by_id('idSIButton9').click()

Selenium C# ElementNotVisibleException: element not interactable but the element is actually visible

戏子无情 提交于 2020-11-29 08:52:06
问题 I'm using Selenium.WebDriver for C# to ask a question on Quora just typing my question in notepad. Everything worked fine since I had to post it. To post it I need to click on a link inside a span like this: <span id="__w2_wEA6apRq1_submit_question"> <a class="submit_button modal_action" href="#" id="__w2_wEA6apRq1_submit">Add Question</a> </span> In order to click it I've tried this method, that I've used for all my previous button clicks: Selecting the element and clicking it: var element =

Unable to locate element using selenium webdriver in python

做~自己de王妃 提交于 2020-11-29 08:32:22
问题 I want to do some automation testing on a website called http://elegalix.allahabadhighcourt.in. I am using the following python code to click a button called "Advanced" on the above website: Code# from selenium import webdriver driver = webdriver.Chrome('./chromedriver') driver.get('http://elegalix.allahabadhighcourt.in') driver.set_page_load_timeout(20) driver.maximize_window() driver.find_element_by_xpath("//input[@value='Advanced']").click() Error# selenium.common.exceptions

Unable to locate element using selenium webdriver in python

自作多情 提交于 2020-11-29 08:28:38
问题 I want to do some automation testing on a website called http://elegalix.allahabadhighcourt.in. I am using the following python code to click a button called "Advanced" on the above website: Code# from selenium import webdriver driver = webdriver.Chrome('./chromedriver') driver.get('http://elegalix.allahabadhighcourt.in') driver.set_page_load_timeout(20) driver.maximize_window() driver.find_element_by_xpath("//input[@value='Advanced']").click() Error# selenium.common.exceptions

Assert if text within an element contains specific partial text

痞子三分冷 提交于 2020-11-25 04:36:07
问题 I have an element within tag that has release notes. I have to validate if it contains specific text. I am able to extract the text using following code: WebDriverWait(self.driver, 10).until(EC.visibility_of_element_located((By.XPATH, ManageSoftware.release_notes_xpath))).get_attribute("innerHTML") How do I assert if it contain a specific text, say "abc". Is there any function like contains() or isPresent() that I can use here? The code that I am working on is: <div id="dialog" class="ui

Ember dropdown selenium xpath

断了今生、忘了曾经 提交于 2020-11-25 04:07:40
问题 How to write xpath for the ember dropdown. <ul id="ember-power-select-options-ember2473" class="ember-power-select-options ember-view" aria-controls="ember-power-select-trigger-ember2473" role="listbox"> <li class="ember-power-select-option" aria-selected="false" aria-current="false" data-option-index="0" role="option">Option A Since the ember id changes, how can i write xpath?? 回答1: With xpath: //ul[contains(@id, 'ember-power-select-options-ember')] With css: ul[id*='ember-power-select