selenium

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

烈酒焚心 提交于 2021-01-29 02:07:12
问题 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"

Can nightwatch.js use usingServer from selenium-webdriver?

帅比萌擦擦* 提交于 2021-01-29 01:49:55
问题 I have a suite of tests using local drivers built with nightwatch. Works well. I am running a basic test using Perfecto Mobile and selenium-webdriver. It works with this example.(https://community.perfectomobile.com/series/20208/posts/1002862) I am trying to connect my suite of nightwatch test to perfecto, but can't start selenium. If this is the url of the selenium server. var url = "https://mobilecloud.perfectomobile.com/nexperience/perfectomobile/wd/hub"; I tried a few ways to set it up

Can nightwatch.js use usingServer from selenium-webdriver?

坚强是说给别人听的谎言 提交于 2021-01-29 01:43:04
问题 I have a suite of tests using local drivers built with nightwatch. Works well. I am running a basic test using Perfecto Mobile and selenium-webdriver. It works with this example.(https://community.perfectomobile.com/series/20208/posts/1002862) I am trying to connect my suite of nightwatch test to perfecto, but can't start selenium. If this is the url of the selenium server. var url = "https://mobilecloud.perfectomobile.com/nexperience/perfectomobile/wd/hub"; I tried a few ways to set it up

How to customize screen resolution with saucelabs (selenium, behat3.0 mink) capabilities

断了今生、忘了曾经 提交于 2021-01-28 22:58:12
问题 This is my behat.yml file : firefox: suites: firefox: contexts: -FeatureContext extensions: Behat\MinkExtension: javascript_session: selenium2 base_url: https://example.com selenium2: wd_host: username:pwd@ondemand.saucelabs.com/wd/hub browser: firefox capabilities: {'platform':'OS X 10.10', 'browser':'firefox', 'version':'42.0', "screen-resolution":"1280x1024"} Which is giving error " [Symfony\Component\Config\Definition\Exception\InvalidConfigurationException] Unrecognized option "screen

Selenium webdriver new tab URL is not loaded properly

China☆狼群 提交于 2021-01-28 21:50:50
问题 I am trying to open a new tab from tab1 (Now i have two different tab. Tab1 & Tab2), the second tab with the URL is not fully loaded, instead it stops at the middle and shows tab as untitled. public void waitForPageLoadComplete(WebDriver driver, int specifiedTimeout) { Wait<WebDriver> wait = new WebDriverWait(driver, specifiedTimeout); wait.until(driverTemp -> String.valueOf(((JavascriptExecutor) driverTemp).executeScript("return document.readyState")) .equals("complete")); } In the above

Selenium webdriver new tab URL is not loaded properly

一个人想着一个人 提交于 2021-01-28 21:28:59
问题 I am trying to open a new tab from tab1 (Now i have two different tab. Tab1 & Tab2), the second tab with the URL is not fully loaded, instead it stops at the middle and shows tab as untitled. public void waitForPageLoadComplete(WebDriver driver, int specifiedTimeout) { Wait<WebDriver> wait = new WebDriverWait(driver, specifiedTimeout); wait.until(driverTemp -> String.valueOf(((JavascriptExecutor) driverTemp).executeScript("return document.readyState")) .equals("complete")); } In the above

which chromedriver version supports electron app?

我的未来我决定 提交于 2021-01-28 20:50:19
问题 I try to run electron app using the following code: @Test public void testElectron() { System.setProperty("webdriver.chrome.driver", chromeDriverPath); ChromeOptions chromeOptions = new ChromeOptions(); chromeOptions.setBinary(this.electronPath); WebDriver driver = new ChromeDriver(chromeOptions); } But I get the following error: Starting ChromeDriver 87.0.4280.88 (89e2380a3e36c3464b5dd1302349b1382549290d-refs/branch-heads/4280@{#1761}) on port 37592 Only local connections are allowed. Please

Get specific value based on column & row name from dynamic Web table in which columns & rows position also dynamic

萝らか妹 提交于 2021-01-28 20:20:18
问题 I have to print a specific value based on column and row names. Bt the problem is that columns position and rows position changes every time. And table data is dynamic, values are changing continuously. All the values are not constantmy dynamic web table is. and i want specific value of month April in year 2001. 回答1: Here is the sample table based on the attached screenshot. <html> <table id='table1' border=" 1px solid black"> <tr> <th>Month/Year</th> <th>2003</th> <th>2004</th> <th>2001</th>

Does Selenium need display monitor

房东的猫 提交于 2021-01-28 20:11:41
问题 I am using Selenium to open a web site, login and copy some information from one web site. However it is happening on my work station and have a display monitor. my IT team wants to move this process to a virtual server which does not have a monitor. 1.Will this work - even if we install Chrome of Firefox on the server 2. Can we Chrome - headless to make this happen 3. Any other way - we can think of using Xserver Please let me know. 回答1: Chrome headless should solve your problem here -- I've

AttributeError: 'Options' object has no attribute 'binary' error invoking Headless Firefox using GeckoDriver through Selenium

百般思念 提交于 2021-01-28 20:06:08
问题 options = FirefoxOptions() options.add_argument("--headless") driver = webdriver.Firefox(firefox_options=options, executable_path='/Users/toprak/Desktop/geckodriver') driver.get("https://twitter.com/login?lang=en") When I try to run my code, I get this error: Warning (from warnings module): File "/Users/toprak/Desktop/topla.py", line 19 driver = webdriver.Firefox(firefox_options=options, executable_path='/Users/toprak/Desktop/geckodriver') DeprecationWarning: use options instead of firefox