expected-condition

How to get total number of nested frames inside the frame

僤鯓⒐⒋嵵緔 提交于 2021-01-28 08:41:03
问题 Snapshot of Frame_top with 3 nested frames: Code: WebElement topframe = driver.findElement(By.xpath("//frame[@name='frame-top']")); String frame1 = driver.switchTo().frame(topframe).switchTo().frame("frame-left").findElement(By.xpath("//body")).getText(); System.out.println(frame1); List<WebElement> nestedFrames = driver.switchTo().frame(topframe).findElements(By.tagName("frame")); System.out.println(nestedFrames.size()); On top you can see this page has nested frames inside the frame(frame

Selenium identifies the button as clickable when it wasn't

China☆狼群 提交于 2020-12-15 05:44:12
问题 I'm having an issue where Selenium is saying a button is clickable even when it's disabled. I'm using Selenium with a website where you have to select a date first and then time slot from a dropdown list before the "Book" button is clickable and will actually do anything. Before the date and time slot are chosen, the button element is <div id="pt1:b2" class="x28o xfn p_AFDisabled p_AFTextOnly" style="width:300px;" _afrgrp="0" role="presentation"><a data-afr-fcs="false" class="xfp" aria

How do you use EC.presence_of_element_located((By.ID, “myDynamicElement”)) except to specify class not ID

落花浮王杯 提交于 2020-08-08 06:41:33
问题 I am trying to use Python to web scrape a website that loads it's HTML dynamically by using embedded javascript files that render the data as a Response into the HTML. Therefore, if I use BeautifulSoup alone, I will not be able to retrieve that data that I need as my program will scrape it before the Javascript loads the data. Due to this, I am integrating the selenium library into my code, to make my program wait until a certain element is found before it scrapes the website. I had

How to click on GWT enabled elements using Selenium and Python

醉酒当歌 提交于 2020-07-23 04:56:17
问题 I'm working with Selenium as a newbie and also as a newbie developer. I try to solve this XPath but with no results that is why I'm looking for help. So I want to click in the checkbox which has a dynamic id but it is not that easy to find this checkbox based on tittle="Viewers" Please notice there is a whole list of checkboxes with names on right from a checkbox in div which I want to include in my tests. HTML: <span class="row-selection"><input type="checkbox" value="on" id="gwt-uid-2215"

How to click on GWT enabled elements using Selenium and Python

ⅰ亾dé卋堺 提交于 2020-07-23 04:55:11
问题 I'm working with Selenium as a newbie and also as a newbie developer. I try to solve this XPath but with no results that is why I'm looking for help. So I want to click in the checkbox which has a dynamic id but it is not that easy to find this checkbox based on tittle="Viewers" Please notice there is a whole list of checkboxes with names on right from a checkbox in div which I want to include in my tests. HTML: <span class="row-selection"><input type="checkbox" value="on" id="gwt-uid-2215"

How to click on GWT enabled elements using Selenium and Python

与世无争的帅哥 提交于 2020-07-23 04:54:32
问题 I'm working with Selenium as a newbie and also as a newbie developer. I try to solve this XPath but with no results that is why I'm looking for help. So I want to click in the checkbox which has a dynamic id but it is not that easy to find this checkbox based on tittle="Viewers" Please notice there is a whole list of checkboxes with names on right from a checkbox in div which I want to include in my tests. HTML: <span class="row-selection"><input type="checkbox" value="on" id="gwt-uid-2215"

How to enter numeric value in input field using Python Selenium?

早过忘川 提交于 2020-06-23 04:47:32
问题 I've got a script writing values into a web page, and all values write except for one field that keeps throwing up the following error: (Screenshot provided b/c in other similar questions many comments said this is impossible to happen on a web page.) "Please enter a numeric value." Here's my code: workcenter_to_add = {} workcenter_to_add['BatchCycle'] = str(2.78) # driver = my_chrome_webpage WebDriverWait(driver, wait_time).until(EC.presence_of_element_located((By.XPATH, "//input[@id=

How to enter numeric value in input field using Python Selenium?

∥☆過路亽.° 提交于 2020-06-23 04:46:40
问题 I've got a script writing values into a web page, and all values write except for one field that keeps throwing up the following error: (Screenshot provided b/c in other similar questions many comments said this is impossible to happen on a web page.) "Please enter a numeric value." Here's my code: workcenter_to_add = {} workcenter_to_add['BatchCycle'] = str(2.78) # driver = my_chrome_webpage WebDriverWait(driver, wait_time).until(EC.presence_of_element_located((By.XPATH, "//input[@id=

How to enter numeric value in input field using Python Selenium?

末鹿安然 提交于 2020-06-23 04:46:12
问题 I've got a script writing values into a web page, and all values write except for one field that keeps throwing up the following error: (Screenshot provided b/c in other similar questions many comments said this is impossible to happen on a web page.) "Please enter a numeric value." Here's my code: workcenter_to_add = {} workcenter_to_add['BatchCycle'] = str(2.78) # driver = my_chrome_webpage WebDriverWait(driver, wait_time).until(EC.presence_of_element_located((By.XPATH, "//input[@id=

Selenium: How selenium identifies elements visible or not? Is is possible that it is loaded in DOM but not rendered on UI?

烈酒焚心 提交于 2020-06-19 03:09:27
问题 Selenium: How selenium identifies elements visible or not? Is is possible that it is loaded in DOM but not rendered on UI? I would like to verify a scenario where element is clickable, I know web drive has method "ElementToBeClickable" however, I would like to know the inner working. Please help me on this. Also,how to handle a scenario where the element is loaded in the DOM but UI shows loading in progress, how to wait for complete load? Please let me know, if the UI is not loaded then will