selenium

How to handle the ratings within bubble rating widget with in Tripadvisor?

我只是一个虾纸丫 提交于 2021-02-07 10:38:35
问题 I hava a scenario in which i need to click fifth bubble of bubble rating widget within tripadvisor The HTML code is: <span id="bubble_rating" class="ui_bubble_rating fl bubble_10" data-value="1" onclick="ta.userreview.common.trackFieldFocus(this); "> <img src="https://static.tacdn.com/img2/x.gif" alt="Roll over, then click to rate"> </span> I am trying with below code snippet: Actions action = new Actions(driver); WebElement element = driver.findElement(By.xpath("//span[@id='bubble_rating']")

Python Selenium with Chrome. How to switch between different tabs

北慕城南 提交于 2021-02-07 10:24:42
问题 I click a button which opens a new tab. How to I then navigate around the new tab? This sounds like a simple task but after several hours trying to find a solution I'm not any closer. Is there a simple way of doing this? Tried using keys for CONTROL + 'T' and read other suggestions but nothing seems to work. Many thanks 回答1: I just implemented my solution and it worked for my case, which looks very similar to yours. First you need to check the window_handles : len(driver.window_handles) > 1

Simulate Click event using selenium in python

浪尽此生 提交于 2021-02-07 10:20:44
问题 I am scraping some data from this link https://www.vbgov.com/property-search#DetailView=14760123360000. But i am unable to simulate click event on "Sales History & Tax Information" tab using webdriver Selenium and python. driver.get("https://www.vbgov.com/property-search#") searchBox1 = driver.find_element_by_id("consolidated-search-query") searchBox1.send_keys("1124 LUKE DR") searchBox1.send_keys(Keys.ENTER) driver.implicitly_wait(5) link = driver.find_element_by_xpath('//*[@id="property"]

Firefox 57 does not load geckoservice in Selenium during end-to-end testing

左心房为你撑大大i 提交于 2021-02-07 10:15:30
问题 I am trying to load Firefox to test my web application using selenium. I am getting SessionNotCreatedError: Unable to create new service: GeckoDriverService error when I specify firefox in the capabilities . Here is how it looks like: var config = { sauceUser: process.env.SAUCE_USERNAME, sauceKey: process.env.SAUCE_ACCESS_KEY, framework: 'jasmine2', capabilities: { browserName: 'firefox', version: '57.0', 'screenResolution': '1920x1440' }, specs: [ '*.spec.js' ], jasmineNodeOpts: { showColors

Twitter scroll down of all posts using Selenium Python

此生再无相见时 提交于 2021-02-07 10:14:16
问题 I am using Selenium with Python. I am trying to scroll down of a twitter page. But it doesn't scroll down till the end of the page. It stops in the middle and twitter shows a message: "back to top" . It doesn't even shows all the posts of last one month of a page. This is my page: users = ['BBCWorld'] username = browser.find_element_by_class_name("js-username-field") username.send_keys("username") password = browser.find_element_by_class_name("js-password-field") password.send_keys("password"

Selenium: Trying to get Firefox console logs results in “WebDriverError: HTTP method not allowed”

倖福魔咒の 提交于 2021-02-07 09:55:01
问题 I'm trying to capture console errors in my selenium tests (node environment with selenium-webdriver 4.0.0-alpha.5 and the latest geckodriver and chromedriver). I've set up one driver for Firefox and another one for Chrome like this: const chrome = require('selenium-webdriver/chrome'); const firefox = require('selenium-webdriver/firefox'); const webdriver = require('selenium-webdriver'); const { Builder, By, Capabilities, until } = webdriver; let loggingPref = new webdriver.logging.Preferences

Selenium: Trying to get Firefox console logs results in “WebDriverError: HTTP method not allowed”

喜夏-厌秋 提交于 2021-02-07 09:54:39
问题 I'm trying to capture console errors in my selenium tests (node environment with selenium-webdriver 4.0.0-alpha.5 and the latest geckodriver and chromedriver). I've set up one driver for Firefox and another one for Chrome like this: const chrome = require('selenium-webdriver/chrome'); const firefox = require('selenium-webdriver/firefox'); const webdriver = require('selenium-webdriver'); const { Builder, By, Capabilities, until } = webdriver; let loggingPref = new webdriver.logging.Preferences

Selenium: Trying to get Firefox console logs results in “WebDriverError: HTTP method not allowed”

主宰稳场 提交于 2021-02-07 09:54:03
问题 I'm trying to capture console errors in my selenium tests (node environment with selenium-webdriver 4.0.0-alpha.5 and the latest geckodriver and chromedriver). I've set up one driver for Firefox and another one for Chrome like this: const chrome = require('selenium-webdriver/chrome'); const firefox = require('selenium-webdriver/firefox'); const webdriver = require('selenium-webdriver'); const { Builder, By, Capabilities, until } = webdriver; let loggingPref = new webdriver.logging.Preferences

OSError: [WinError 6] The handle is invalid [Selenium Python]

╄→尐↘猪︶ㄣ 提交于 2021-02-07 09:26:26
问题 I've been running my suite of tests and I'm seeing this error message when I execute my suite. Command used in cmd line: py TestSuite.py Output: Test1 (__main__.TestSuite) ... ok Test2 (__main__.TestSuite) ... ok Test3 (__main__.TestSuite) ... ERROR Test4 (__main__.TestSuite) ... ERROR Test5 (__main__.TestSuite) ... ERROR Test6 (__main__.TestSuite) ... ERROR Test7 (__main__.TestSuite) ... ERROR Traceback (most recent call last): File "E:\Python\lib\site-packages\selenium\webdriver\chrome

Azure Function using Selenium WebDriver.dll

99封情书 提交于 2021-02-07 08:35:59
问题 i am trying to use Selenium WebDriver.dll from Azure Function C# code and having following issue when instantiating WebDriver. Error: 2017-10-16T20:02:25.169 Exception while executing function: Functions.fnTestSelenium. Microsoft.Azure.WebJobs.Script: One or more errors occurred. mscorlib: The path is not of a legal form.2017-10-16T20:02:25.278 Function completed (Failure, Id=2fcb928f-ee39-4cfe-99f2-4be2d57e91b2, Duration=843ms) Code #r "D:\home\site\wwwroot\fnTestSelenium\bin\WebDriver.dll"