selenium-webdriver

Selenium: are there events like “New element inserted in DOM”

两盒软妹~` 提交于 2020-01-24 18:20:51
问题 The site I am testing has a notification logic that brings up a message at the bottom of the screen, keeps it there for one second and then sends it away. When the notification is displayed it hides other elements and that makes my test unstable. I did my best to figure out when the notification is displayed (when the business logic displays it) and dismiss it but every now and then I detect new cases my code are not aware of when the notification is displayed. Is there a way (using Selenium)

Select drop down option using Selenium. Headless chrome. Python

余生颓废 提交于 2020-01-24 16:39:39
问题 I am attempting to select an option from a drop down menu that expands the records on a page. It works fine when I am not running headless. When I run in headless I get a timeout exception error while the page waits to find the element. <select name="ctl00$ContentPlaceHolder1$uxTabContracts$uxTabPanelWaintingApproval$uxGridList$ctl05$uxUCGridViewPagingTemplate$uxDropDownListPageSize" onchange="javascript:setTimeout('__doPostBack(\'ctl00$ContentPlaceHolder1$uxTabContracts

SpecFlow + Selenium2 + ASP.NET MVC + TeamCity Not Working

好久不见. 提交于 2020-01-24 15:05:26
问题 I have some SpecFlow features which are using Selenium 2 to automate some UI testing of an ASP.NET MVC 3 application. When I run these locally, it runs fine and the tests pass. Once committing my changes to Git and pushing the commits to our remote repository for our TeamCity instance to pick up, the tests run and take a hell of a lot longer, only to fail with the following. Test(s) failed. OpenQA.Selenium.WebDriverException : No response from server for url http://localhost:7055/hub/session

SpecFlow + Selenium2 + ASP.NET MVC + TeamCity Not Working

被刻印的时光 ゝ 提交于 2020-01-24 15:05:09
问题 I have some SpecFlow features which are using Selenium 2 to automate some UI testing of an ASP.NET MVC 3 application. When I run these locally, it runs fine and the tests pass. Once committing my changes to Git and pushing the commits to our remote repository for our TeamCity instance to pick up, the tests run and take a hell of a lot longer, only to fail with the following. Test(s) failed. OpenQA.Selenium.WebDriverException : No response from server for url http://localhost:7055/hub/session

SpecFlow + Selenium2 + ASP.NET MVC + TeamCity Not Working

只谈情不闲聊 提交于 2020-01-24 15:04:05
问题 I have some SpecFlow features which are using Selenium 2 to automate some UI testing of an ASP.NET MVC 3 application. When I run these locally, it runs fine and the tests pass. Once committing my changes to Git and pushing the commits to our remote repository for our TeamCity instance to pick up, the tests run and take a hell of a lot longer, only to fail with the following. Test(s) failed. OpenQA.Selenium.WebDriverException : No response from server for url http://localhost:7055/hub/session

Unable to find element with css selector

白昼怎懂夜的黑 提交于 2020-01-24 10:10:46
问题 Using Selenium Webdriver for FF/IE using C# (.Net) Below is my page source and I am trying to use the CssSelector to find/contains the particular name from my page and i have tried with the below code but resulting in error, any help? //code driver.FindElement(By.CssSelector("td:contains('John John')")) //error: e {"Unable to find element with css selector == td:contains('John John')"} System.Exception {OpenQA.Selenium.NoSuchElementException} //my html code: <div id="ctl00_ContentPlaceHolder1

Unable to find element with css selector

 ̄綄美尐妖づ 提交于 2020-01-24 10:10:40
问题 Using Selenium Webdriver for FF/IE using C# (.Net) Below is my page source and I am trying to use the CssSelector to find/contains the particular name from my page and i have tried with the below code but resulting in error, any help? //code driver.FindElement(By.CssSelector("td:contains('John John')")) //error: e {"Unable to find element with css selector == td:contains('John John')"} System.Exception {OpenQA.Selenium.NoSuchElementException} //my html code: <div id="ctl00_ContentPlaceHolder1

How to web-scrape multiple page with Selenium (Python)

一笑奈何 提交于 2020-01-24 09:08:05
问题 I've seen several solutions to scrape multiple pages from a website, but couldn't make it work on my code. At the moment, I have this code, that is working to scrape the first page. And I would like to create a loop to scrape all the page of the website (from page 1 to 5) import pandas as pd from selenium import webdriver from selenium.webdriver.chrome.options import Options from bs4 import BeautifulSoup options = Options() options.add_argument("window-size=1400,600") from fake_useragent

How to web-scrape multiple page with Selenium (Python)

此生再无相见时 提交于 2020-01-24 09:08:04
问题 I've seen several solutions to scrape multiple pages from a website, but couldn't make it work on my code. At the moment, I have this code, that is working to scrape the first page. And I would like to create a loop to scrape all the page of the website (from page 1 to 5) import pandas as pd from selenium import webdriver from selenium.webdriver.chrome.options import Options from bs4 import BeautifulSoup options = Options() options.add_argument("window-size=1400,600") from fake_useragent

Python Selenium `move_by_offset` doesn't work

百般思念 提交于 2020-01-24 06:29:01
问题 Calling simple scrolling action with Python Selenium doesn't work : driver = webdriver.Chrome() driver.get('https://www.wikipedia.org/') time.sleep(2) actions = ActionChains(driver) actions.move_by_offset(500, 500).perform() For example function with moving to element, works Ok and Do scroll: driver = webdriver.Chrome() driver.get('https://www.wikipedia.org/') time.sleep(2) element = driver.find_element_by_css_selector(<Something>) actions = ActionChains(driver) actions.move_to_element