Tag Info

Hot answers tagged

3

This error means that you have forgotten to include a dependency in your project. It's been suggested on stackoverflow that the dependency you forgot might well be selenium-server-standalone-version.jar. Does adding that jar to your project help?


3

Uploading files using Webdriver Locally If the file is on the same machine or a mapped network drive, this is actually really straightforward: You need to "type" the path to the file into the file upload control. Example: driver = webdriver.Firefox() element = driver.find_element_by_id("fileUpload") element.send_keys("C:\myfile.txt") (Code from This SO ...


3

Normally both your home and the company networks are fire-walled, letting no external traffic in. There are two possible solutions: Poke holes in the company firewall for Selenium traffic back and forth Create a VPN-tunnel between both Poking holes Make sure the firewall and routers forward any traffic on port 4444 to the company internal Selenium hub ...


3

List cheeses = driver.findElements(By.className("cheese")); findElements() does not wait, but returns list of elements (located by locator). List is empty if nothing is found. http://docs.seleniumhq.org/docs/03_webdriver.jsp


2

Selenium 2 (webdriver) is designed to do exactly what you need. It allows you to simulate whatever real users can do with a browser: log to a website, click on buttons, fetch content of HTML elements, and analyze the text using any tools necessary. You can use different kinds of locators to identify HTML elements to process (ID, name, CSS class, link text ...


2

You can use Selenium Webdriver to automate this task. It can read the DOM of the HTML, and extract information from it; it controls a browser the same way you do, so anything you can do manually it can do (with a few exceptions). I would suggest looking into that rather than taking screenshots and parsing them as PDFs.


2

Upload a file using Robot class This method is for handling the Windows File Upload dialog, which cannot be handled using Selenium. Please follow below steps: Click on the File Upload / Choose File button, so that the File Upload dialog is displayed. driver.findElement(By.id("uploadbutton")).click; Copy your file's absolute path to the clipboard ...


2

Setting up Selenium tests to run on Safari browser is a fairly complex process. You need to install Safari Extensions Developer Certificate in your machine and also install selenium webdriver as an extension in Safari Browser. Also there are some stability issues with Safari browser automation & Selenium combination on Mac 10.9 OS and below. The ...


2

Your screenshot function is creating a new WebDriver instance each time and then taking a screenshot of the default blank page in firefox. You could try passing in your test's WebDriver instance so you get a picture from your test: static public void screenShotOnError(WebDriver driver) { long epoch = System.currentTimeMillis(); String ssTimestamp = ...


1

Check this code. It works properly in IE. All you need to set some capabilities. DesiredCapabilities ieCapabilities = DesiredCapabilities.internetExplorer(); ieCapabilities.setCapability("nativeEvents", false); ieCapabilities.setCapability("unexpectedAlertBehaviour", "accept"); ieCapabilities.setCapability("ignoreProtectedModeSettings", true); ...


1

This line: password = slogin.passwordField1; Is a simple assignment. It's not the line that throws the exception. PageFactory will attempt to lazy-initialize the field when it is used, not just referenced; I'm not 100% clear on whether assignment is considered a use, but it's very likely that it's the return statement that's throwing instead. For this use ...


1

Implicit Wait: An implicit wait is to tell WebDriver to poll the DOM for a certain amount of time when trying to find an element or elements if they are not immediately available. The default setting is 0. Once set, the implicit wait is set for the life of the WebDriver object instance. WebDriver driver = new FirefoxDriver(); ...


1

Upload a file using AutoIT About AutoIT: AutoIt v3 is a freeware BASIC-like scripting language designed for automating Windows GUI and general scripting. It uses a combination of simulated keystrokes, mouse movement and window/control manipulation in order to automate tasks. This method is for handling the Windows File Upload dialog, which cannot be ...



Only top voted, non community-wiki answers of a minimum length are eligible