Tag Info

New answers tagged

0

Instead of simple System.out.println (last line in your example) try out the following: PrintStream out = new PrintStream(System.out, true, "UTF-8"); out.println("Currency Selected:" +select.getText());


0

Thanks for your responses finally I solved it cutting out some plugins and blocked some third party ads before starting the tests. Solution 1: There are some plugins like flash player which may hangs the browser inconsistently waiting for some resource during test run, try disabling such plugins while starting the test using the chrome switches. ...


1

It sounds like the majority of your issue is in creating the connection to your Database. However, you lack to mention the type of database so I will try and cover some of the more popular ones. Oracle Tutorial or SO Question SQL Server JTDS I could list all of the types of databases for years so here is a list of database related tutorials. If you need ...


0

In our application we are using web-services and DB, is it possible to integrate Selenium webdriver with web-services (Soap UI)? Since this is in Java, yes it is possible to interact with SoapUI using the test runner or by importing SoapUI into Java and running it as a background task. If two different frameworks are integrated, whether this is ...


1

I eventually managed to find a fix for this! Here is the code that I added: cap = DesiredCapabilities.INTERNETEXPLORER cap['requireWindowFocus'] = True cap['enablePersistentHover'] = False I put this just before self.browser = webdriver.Ie() Although, this may not be a long term solution as it requires the IE window you are using to be your current ...


1

Do you have a single monitor? Is your actual mouse cursor hovering over the page while your automation is running? Sometimes your mouse will mess up the automation that is running. If you have a second monitor, or if you can move your mouse cursor outside of the bounds of the browser window, do you still have the problem? In javascript there isn't a ...


0

Try this: var dfs = driver.FindElement(By.XPath("//table[@id='PowerReserveTables2_0']/tbody/tr/td[6]/div")).Text.split("<br></br>")[1].trim();


1

WebDriver is quite more reasonable option anyway. Everything you can automate with Selenium RC, you can do with Selenium WebDriver. If you can't perform some action with native methods (like yours "Being able to click on hidden links within sub-menus"), you can achieve the same with executing JavaScript commands from WebDriver. Selenium WebDriver will ...


3

Since Selenium RC is deprecated and you touch on future-proofing, you should choose WebDriver. WebDriver expertise is more valuable to you because it's more transferrable. Yours is a future worth proofing. Over time, WebDriver expertise will only become more common than RC expertise. Subsequent hiring managers in your organization will appreciate this ...


4

Webdriver is not only more modern. It is future W3C standard. Being able to click on hidden links seems like a misfeature. I would use old version only if newer version was seriously lacking important features without which I cannot live.


4

You can use the findElements method to find all TD tags that match your criteria, and then getText method to retrieve each element's value. The latter will be returned as a String, so you may need to convert it to a number before comparing it. Since the sorted elements have a special class, you may want to use a CSS selector with findElements.


0

What you are trying to test feels like pretty basic automated web testing. Do some action Wait for new element to appear Verify content of element Without the actual HTML its hard for anyone to assist you with identifying the element. Elements are identified in Selenium with different type of selectors. I think the best advice I can give you is to get ...


1

oh ok, that's a tricky one. This is what I know regarding this subject, see if it can help: - only after you close the browser the changes you made take effect - maybe you could, instead of using the hosts, use the name of the pc that has the app running, we do it in my company. I.E. PC1 has the app, instead of puting the ip and the url on the hosts file, ...


0

It looks like this issue has been logged as a bug for Selenium but has not yet been fixed: https://code.google.com/p/chromedriver/issues/detail?id=402 They are looking for a specific repro, maybe you could help them out by posting your specific repro? One person reported that removing any driver timeout options from their code solved the problem: ...


0

You can use the ActionBuilder. driver.action.moveToElement(element, xOffset, yOffset).click().perform() More examples if you need them: http://selenium.googlecode.com/svn/trunk/docs/api/rb/Selenium/WebDriver/ActionBuilder.html


1

I'd second Lyndon's additions to Dmitry's advice. A few other thoughts from my experience: a little formal logic never goes astray. if any of your non-coders are strongly against learning to code, that's fine. You need strong manual testers too, and coding takes a mindset that not everyone possesses. The insight the manual people get from their ...


-1

Try with other things like cssSelector,id,name name should be used in the place where u have text field box suppose if u r doing for a web application in the sense u have to use cssselector suppose if u have drop down list field u have go with id


0

The getWindowHandle() function returns the current window, I think you cannot switch to the current window. You want to use getWindowHandles() to find other windows. For an example and similar issue see: http://stackoverflow.com/questions/19112209/how-to-handle-the-new-window-in-selenium-webdriver


0

For each suite you have to specify parallel="classes" and thread-count then testcases under that suite will run in parallel Below is working testng.xml. u can give a try surely it will work since its working for me. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"> <suite name="Suite" ...


6

I'm going to completely agree with Dmitry, however, I'd like to add to it. This is a perfect example of when you could begin teaching your other testers to code. I've seen this work very well with working sessions and paired programming. I've done this previously with a department where we got together every week or 2 for an hour and went over writing ...


0

Try the following, it should work: $this->element($this->using('css selector')->value('*[class="sideNav"]')); instead of $this->byClassName('sideNav');


3

As a possible solution: You can add BDD solution to your test framework. For Java popular BDD solutions are JBehave and Cucumber-JVM. So other members will write tests in Gherkin human-like language. How it looks like? — you may ask.. The test it self is a textual description: Feature: Adding Scenario: Add two numbers Given the input "2+2" ...


0

To verify that slider content can be changed manually, the following solution can be used: WebElement slider = driver.findElement(By.xpath("//div[@id='slider']/a")); Actions builder = new Actions(driver); action.click(slider).sendKeys(Keys.ARROW_RIGHT).perform(); And then check that text or image has changed.


3

keyDown method presses the key but doesn't release it. Try to replace aBuilder1.keyDown(Keys.SHIFT).click(link1).perform(); with aBuilder1.keyDown(Keys.SHIFT).click(link1).perform(); aBuilder1.keyUp(Keys.SHIFT).perform();


0

XPath locator should begin with //. So try driver.findElement(By.xpath("html/body/table/tbody/tr/td[2]/table/tbody/tr[2]/td[1]/table/tbody/tr[283]/td[2]/a")).click();*


1

In SeeTest there is out-of-box concept called Zone. Zones are similar to containers and allow to group elements as you wish. It's obvious to group elements by functional areas / pages / screens. So Zones are similar to Page Objects in some sense. Here are few Zone-related official help pages: Terminology > Zone Add a new Zone To develop your own ...


0

First of all, try the solution suggested here. Also you can try the following [source] First of all, try resetting Firefox: https://support.mozilla.org/en-US/kb/reset-firefox-easily-fix-most-problems If this doesn’t help, try to remove your old profile and create a new one manually via Firefox Profile Manager: ...


0

NONONONONO. All above posters have it wrong. Polling and latching and what not do not account for INHERENT RANDOMNESS or SELENIUM BUGINESS . Why does a test fail and turn red in Jenkins or some other automated build? Here are the past 5 selenium failures on our build An element doesn't have a type="file". Selenium chokes sending input keys to it for ...


0

Try with .//*[@id='colDiv_Apr282014']//div[contains(concat(' ',normalize-space(@class),' '),' time ')]


1

I have seen this error in other WebDriver projects, and my experience suggests that the URL you're passing as the first parameter to the RemoteWebDriver constructor is not a valid RemoteWebDriver grid URL. Double-check to ensure that the WebDriver grid server is running, and that the URL is valid for the server. For example, my RemoteWebDriver URLs look ...


1

Selenese scripts generated by IDE are HTML without parameters, unlike traditional scripting/programming. What programming language is main language in your organization? Python is very easy to learn and has good Selenium bindings. Also, learning general programming language (Python) could be interesting career-enhancing move for your testers (so they ...


1

If your team members don't have much development experience and you would like to use Selenium Webdriver for your automation tests I highly recommend taking a look at Robot Framework. Robot Framework is a generic framework to which you can easily plug in external libraries and script your automation tests using keywords. There is Selenium Library which ...


6

The browser date/time functions are all JavaScript. You should be able to use Sinon.JS or TimeShift.JS to mock the date/time. Inject/Add the mocking framework during tests runs Mock the Date object with the JavaScript Executor Set the timezone Run tests Now all calls to the internal Date object will return the shifted time. For examples see this post ...


2

Selenium Builder is the evolution of the Selenium IDE. Its tooling page has a video (11 minutes) about using it with Travis-CI. Although I haven't watched it I expect it will answer most of your questions. To simplify test building (for non developers) I would suggest using something like Cucumber or another BDD framework, you can then make a lot of ...



Top 50 recent answers are included