selenium-webdriver

How do i change the download path dynamically during runtime using chrome in Selenium

痴心易碎 提交于 2020-07-10 10:26:23
问题 I have 20 pages and each page have 2 testcases and each testcase download a number of files. I want to change the download directory for each test case at runtime. Here is the 'TestBaseClass' code which downloading all the files in one particular folder from where I have to separate them as per category and place them into a particular folder. There are 20 folders and each folder is having 2 subfolders 'ChapterLevel' & 'PracticeLevel' in which I do have to place it manually. Is it possible to

None response and empty title from selenium webdriver in functional test

荒凉一梦 提交于 2020-07-10 10:26:02
问题 I followed this tutorial (Build DevOps CI/CD pipeline for Python Flask with Azure DevOps). There is a command line task to execute a functional test which I get an error while running it. The command line task script is as follows: pip install selenium && pip install pytest && pytest Tests/functional_tests/ --webAppUrl=$(webAppUrl.AppServiceApplicationUrl) --junitxml=TestResults/test-results.xml This is the script used for functional test: import pytest from selenium import webdriver import

Max retries exceeded with URL Selenium [duplicate]

六眼飞鱼酱① 提交于 2020-07-09 12:05:32
问题 This question already has answers here : MaxRetryError: HTTPConnectionPool: Max retries exceeded (Caused by ProtocolError('Connection aborted.', error(111, 'Connection refused'))) (2 answers) Closed 8 months ago . So i'm looking to traverse a URL array and open different URL's for web scraping with Selenium. The problem is, as soon as I hit the second browser.get(url), I get a 'Max retries exceeded with URL' and 'No connection could be made because the target machine actively refused it'.

Selenium Python Select the first item from a drop down by index is not working. Unbound method select_by_index

一笑奈何 提交于 2020-07-08 12:54:37
问题 I am trying to click the first item from a drop down. I want to use it's index value because the value could be different each time. I only need to select the 1st item in the drop down for this particular test. I have tried Select.select_by_index(1) I am getting the error: Traceback (most recent call last): File "C:\Webdriver\ClearCore 501 Regression Test\ClearCore - Regression Test\TestCases\DataPreviewsPage_TestCase.py", line 398, in test_a2_sort_data_preview_advanced data_previews_view

Selenium Python Select the first item from a drop down by index is not working. Unbound method select_by_index

不羁的心 提交于 2020-07-08 12:53:44
问题 I am trying to click the first item from a drop down. I want to use it's index value because the value could be different each time. I only need to select the 1st item in the drop down for this particular test. I have tried Select.select_by_index(1) I am getting the error: Traceback (most recent call last): File "C:\Webdriver\ClearCore 501 Regression Test\ClearCore - Regression Test\TestCases\DataPreviewsPage_TestCase.py", line 398, in test_a2_sort_data_preview_advanced data_previews_view

How to press CTRL+T and CTRL+TAB in selenium WebDriver using Java?

雨燕双飞 提交于 2020-07-07 06:00:19
问题 Hi All, For one of my project I need to open a new tab and navigate between the tabs for the same I need to know how can I press CTRL + T and CTRL + TAB in Selenium Webdriver using Java. Please let me know how can I do the same.Thank You...!!! I'm using the below: Firefox Version: 48.0.2 Java Version: 1.8 Selenium WebDriver Version: 3.0.0 OS: Windows 10 I tried the below code but it doesn't seems to be working: import org.openqa.selenium.By; import org.openqa.selenium.Keys; import org.openqa

How to press CTRL+T and CTRL+TAB in selenium WebDriver using Java?

自作多情 提交于 2020-07-07 06:00:05
问题 Hi All, For one of my project I need to open a new tab and navigate between the tabs for the same I need to know how can I press CTRL + T and CTRL + TAB in Selenium Webdriver using Java. Please let me know how can I do the same.Thank You...!!! I'm using the below: Firefox Version: 48.0.2 Java Version: 1.8 Selenium WebDriver Version: 3.0.0 OS: Windows 10 I tried the below code but it doesn't seems to be working: import org.openqa.selenium.By; import org.openqa.selenium.Keys; import org.openqa

Can I run multiple instances at once(simultaneously) with selenium-webdriver?

心不动则不痛 提交于 2020-07-06 10:34:37
问题 I'm trying to use Selenium to automate file uploading. I'v already wrote a tiny program with the selenium-webdriver that works. The problem is, there are thousands of files need to be uploaded, I'd like to run multiple browser instances simultaneously to speed up the automation. So I tried something like this var i = 0; while (i < 10) { i++; var driver = new webdriver.Builder() .forBrowser('firefox') .build(); // login and upload files...... } I expected this would create 10 browser instances

Can I run multiple instances at once(simultaneously) with selenium-webdriver?

烂漫一生 提交于 2020-07-06 10:34:06
问题 I'm trying to use Selenium to automate file uploading. I'v already wrote a tiny program with the selenium-webdriver that works. The problem is, there are thousands of files need to be uploaded, I'd like to run multiple browser instances simultaneously to speed up the automation. So I tried something like this var i = 0; while (i < 10) { i++; var driver = new webdriver.Builder() .forBrowser('firefox') .build(); // login and upload files...... } I expected this would create 10 browser instances

WebDriverError: no such session error using ChromeDriver Chrome through Jenkins and Selenium

和自甴很熟 提交于 2020-07-06 05:53:13
问题 Often I am getting no such session error when I am running the scripts from Jenkins. What's the cause for it? Is there any connection failure or is it due to someother reason (I am running around 26 scripts and out of it atleast one script has no such session error) The scripts are different scripts and no such session error is not again repeated for the same scripts 回答1: I met this kind of case sometimes. I use ChromeDriver with Laravel Dusk, rather than Selenium. However, I believe the