selenium

Selenium : How to stop geckodriver process impacting PC memory, without calling driver.quit()?

社会主义新天地 提交于 2021-01-29 04:40:54
问题 There is a test, smth like: import //needed imports public class TestClass{ WebDriver driver; @Before public void setUp() { //some code } @Test public void test1() { //some code, including init of driver (geckodriver) } //@After // public void tearDown() { // driver.quit(); //} } So, I inited geckodriver, and successfully running my tests, using firefox instances. But I want Not to close firefox window after each run, because I just want to analyse what I have, and fix any needed, after test

Selenium : How to stop geckodriver process impacting PC memory, without calling driver.quit()?

心不动则不痛 提交于 2021-01-29 04:37:43
问题 There is a test, smth like: import //needed imports public class TestClass{ WebDriver driver; @Before public void setUp() { //some code } @Test public void test1() { //some code, including init of driver (geckodriver) } //@After // public void tearDown() { // driver.quit(); //} } So, I inited geckodriver, and successfully running my tests, using firefox instances. But I want Not to close firefox window after each run, because I just want to analyse what I have, and fix any needed, after test

Use of Scenario outline in passing the scenario name as example

社会主义新天地 提交于 2021-01-29 03:52:00
问题 Can I use scenario outline concept in scenario name in Specflow so that I pass the scenario name in Example. For example if I want to run my scenario in three browsers IE, FF and chrome, I'll pass three examples. I have tried it in Cucumber and it works, can I do it with Specflow in VS ? Like Scenario outline : <Scenario name> steps 1 step 2 Examples: |Scenario name| |scenario 1 | |scenario 2 | |scenario 3 | can I implement that ? 来源: https://stackoverflow.com/questions/36917437/use-of

How do I link and scale multiple docker containers?

耗尽温柔 提交于 2021-01-29 03:20:13
问题 I would like to use Selenium Grid's Docker images to execute tests in parallel. In order to do so, I wish to dispatch each test suite to a different browser node. Each node would have to be paired up with its own dockerized server so that the tests may run. So my question is what is the best way to link the container pairs? Is there a way to easily scale the server-node pairs, perhaps with Docker Compose? I am pretty new to all of this, so apologies if what I am trying to achieve isn't very

Return html code of dynamic page using selenium

偶尔善良 提交于 2021-01-29 03:10:16
问题 I'm trying to crawl this website, problem is it's dynamically loaded. Basically I want what I can see from the browser console, not what I see when I right click > show sources. I've tried some selenium examples but I can't get what I need. The code below uses selenium and get only what you get in right click -> show code. How can I get the content of the loaded page? from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from

How can I pass a fake media stream to safari IOS in browserStack capability?

£可爱£侵袭症+ 提交于 2021-01-29 02:58:14
问题 I am using protractor and selenium with browser stack and trying to automate a webrtc web application, I need to get rid of browser asking for permission and using a fake stream instead of real camera and mic as available in chrome. I have tried using these options they both do not work. Option 1: var capabilities = { 'browserName': 'iPhone', 'device': 'iPhone 6S', 'realMobile': 'true', 'os_version': '11.4', "media.navigator.permission.disabled": true, "media.navigator.streams.fake": true };

Python Selenium: How to get cookies and format them to use in an http request

久未见 提交于 2021-01-29 02:50:49
问题 I am wondering the best way to get the cookies from a selenium webdriver instance (chromedriver), and convert them into a cookie string that can be passed as an http header. Here is the way I have tried doing it: getting the list of a dictionary per cookie that selenium provides, then manually adding equal signs and semicolons to format it as it would be in the Cookie header. The problem is: this does not work, on the site I'm testing it returns 500 internal server error, which I assume is

Open Application (such as zoom.us) with Selenium Webdriver

核能气质少年 提交于 2021-01-29 02:20:55
问题 I want to be able to use pure selenium webdriver to open a zoom link in Chrome and then redirect me to the zoom.us application. When I execute this: from selenium import webdriver def main(): driver = webdriver.Chrome() driver.get("https://zoom.us/j/000-000-000") main() I receive a pop-up saying https://zoom.us wants to open this application. and I must press a button titled open zoom.us to open the app. Is there a way to press this pop-up button through selenium. Or, is there some other way

Why does Selenium get the child elements slowly

可紊 提交于 2021-01-29 02:13:21
问题 For example, HTML: <input type="hidden" name="ie" value="utf-8"> this element don't have child element, when I use code: List<WebElement> childElements = ele.findElements(By.xpath("./*")); the program uses a very long time (about 30s) return a result. And the result size is right which is zero. So how can I resolve this problem? Thanks. 回答1: As per the documentation findElements() method is affected by the implicit wait duration in force at the time of execution. When implicitly waiting,

Need help for webdriver and Javascript for a hidden File upload element

江枫思渺然 提交于 2021-01-29 02:11:41
问题 I am trying to automate a file upload scenario in a client web application. The code of the entire file upload form looks like this <td valign="top"> <iframe id="batchLoad:inputFile:uploadFrame" class="iceInpFile" width="600px" scrolling="no" height="30px" frameborder="0" title="Input File Frame" style="border-collapse:collapse; border-spacing:0px; padding:0px;" src="/hip-webapp/block/resource/LTExMzg4MjQzMTY=/" name="batchLoad:inputFile:uploadFrame" marginwidth="0" marginheight="0"