selenium

Сhromedriver: how to add support of Chromium-based browsers

倾然丶 夕夏残阳落幕 提交于 2021-01-28 04:36:01
问题 What is required to add a browser to the list of available browsers for UI-automation frameworks/wrappers to successfully running of autotests through the appropriate browser? For example, I want to adding browser "Sputnik", which using Chromium core. 回答1: TL;DR: Use Selenium + Codeception (or any other chrome-supported framework), add to configuration a special enviroment for "non-valid" browser as Sputnik, wherein path to binary is equivalent to your chrome-binary. Recompile chromedriver

InvalidArgumentException: Message: binary is not a Firefox executable error using GeckoDriver Firefox Selenium and Python

萝らか妹 提交于 2021-01-28 04:35:53
问题 I am having trouble with a selenium error related to a FireFox binary. I added C:/Users/Mack/AppData/Local/Programs/Python/ to PATH using backslashes and rebooted. I downloaded what I thought is the correct file here https://github.com/mozilla/geckodriver/releases I put the file in the directory connected to PATH. To remedy this: I tried using two backslashes binary = FirefoxBinary("C:\\Users\Mack\AppData\Local\Programs\Python\Python38-32\geckodriver-v0.27.0-win64\geckodriver.exe") which

Сhromedriver: how to add support of Chromium-based browsers

蹲街弑〆低调 提交于 2021-01-28 04:25:44
问题 What is required to add a browser to the list of available browsers for UI-automation frameworks/wrappers to successfully running of autotests through the appropriate browser? For example, I want to adding browser "Sputnik", which using Chromium core. 回答1: TL;DR: Use Selenium + Codeception (or any other chrome-supported framework), add to configuration a special enviroment for "non-valid" browser as Sputnik, wherein path to binary is equivalent to your chrome-binary. Recompile chromedriver

Pass POJOs in Cucumber Example table

北战南征 提交于 2021-01-28 04:16:53
问题 Description: As a test developer, I would like to use a single scenario to test 3 different environments. Simplified Scenario example: @smoke Scenario: Login to the login page and assert that the user is logged in Given User navigates to the page And User enters valid login credentials When User clicks on the login button Then Landing page can be seen Data ( These are grabbed from a property file - converted to POJO ) : Env1.class url = www.environment1.com username = john password = doe1

Entering text to span Selenium/Python

一曲冷凌霜 提交于 2021-01-28 04:10:21
问题 I try to enter text to span in place of "SAMPLE TEXT". I'm using Selenium/Python but I can't do it using send_keys method. Do you have any other ideas how can I do that? I attached screenshots with HTML and screenshot from app I tried to use that code, but doesnt work: body = driver.find_element_by_xpath('//*[@id="oss-view-wrapper"]/main/div/div/div[2]/div/div[2]/div[1]/div/div/div[2]/div/div/div[2]/div/div[2]/div[2]/div/div/div/div[2]/div/div/div/div/div/div[6]/div[1]/div/div/div/div[5]/div

Selenium Chrome gets detected

限于喜欢 提交于 2021-01-28 03:31:30
问题 I'm trying to make a bot for https://www.phonehouse.nl/verlengchecker . But when I use Chrome it gets detected. When I use Firefox it only opens the page and doesn't do anything. I tried it on Arch linux and Windows result is the same. from selenium import webdriver from time import sleep capabilities = { 'browserName': 'chrome', 'chromeOptions': { 'useAutomationExtension': False, 'forceDevToolsScreenshot': True, 'args': ['--start-maximized', '--disable-infobars'] } } driver = webdriver

Selenium WebDriver on IE11 always has “--port=” in URL

断了今生、忘了曾经 提交于 2021-01-28 03:24:27
问题 I am trying to run some automated tests on IE11 using Selenium Webdriver. Whenever I run my code the URL that IE tries to load is http://--port=38198/ I am trying to simply load Google and return the title, then I will move onto the actual automated testing I intend to do. Here is a sample of my code so far; private WebDriver driver; private String baseUrl; @Before public void setUp() throws Exception{ System.setProperty("webdriver.ie.driver", "C:\\Program Files\\Internet Explorer\\iexplore

Selenium Chrome gets detected

谁说胖子不能爱 提交于 2021-01-28 02:17:03
问题 I'm trying to make a bot for https://www.phonehouse.nl/verlengchecker . But when I use Chrome it gets detected. When I use Firefox it only opens the page and doesn't do anything. I tried it on Arch linux and Windows result is the same. from selenium import webdriver from time import sleep capabilities = { 'browserName': 'chrome', 'chromeOptions': { 'useAutomationExtension': False, 'forceDevToolsScreenshot': True, 'args': ['--start-maximized', '--disable-infobars'] } } driver = webdriver

Web scraping with selenium and python - xpath with contains text

こ雲淡風輕ζ 提交于 2021-01-28 02:00:22
问题 I will try to make it really short. I am trying to click on a product that came out of a search from a website. Basically there is a list of matching products, and I want to click on the first one which contains the product name I searched in its title. I will post the link of the website so you can inspect its DOM structure: https://www.tonercartuccestampanti.it/#/dfclassic/query=CE285A&query_name=match_and In this case, many contain my query string, and I would simply like to click on the

Selenium WebDriver on IE11 always has “--port=” in URL

牧云@^-^@ 提交于 2021-01-28 01:50:58
问题 I am trying to run some automated tests on IE11 using Selenium Webdriver. Whenever I run my code the URL that IE tries to load is http://--port=38198/ I am trying to simply load Google and return the title, then I will move onto the actual automated testing I intend to do. Here is a sample of my code so far; private WebDriver driver; private String baseUrl; @Before public void setUp() throws Exception{ System.setProperty("webdriver.ie.driver", "C:\\Program Files\\Internet Explorer\\iexplore