Web Automation With Selenium Webdriver

May 12, 2015

I wanted to learn a bit about web automation and I began doing a project with selenium webdriver in java. Although the problems I'm having aren't usually java one they are too diverse. The problem rigth now is locating the dropdown element "My offers". I've tried with xpath and css but could find the right one.

/*
* The program opens the MagicCardMarket web, checks if I'm logged, if not it enters username and password, then it goes to My offers, it counts the number of rows and loops through them, in each row it stores the name of the card, the expansion, the language, the condition, if it's foil, signed, a playset or altered and it stores the card number. If it's a playset it multiplies the card number by four.
*
* Then it searches that card, selects the corresponding expansion, then it filters by the corresponding language and if it's foil, signed or altered, and checks the condition row until it finds a card with the same or equal condition (Mint, Near Mint, Excellent, Good, Light Played, Played, Poor), then stores the price, if it is a playset it divides the price by 4 and goes back to My offers and edits the price.
*/

package scripts;
import java.util.List;
import org.openqa.selenium.By;
import org.openqa.selenium.NoSuchElementException;

[Code]....

View Replies


ADVERTISEMENT

Unable To Compile One Of Selenium WebDriver Files To Run From The Command Line

Apr 24, 2015

I'm trying to compile one of my Selenium WebDriver .java files to run from the command line. Since it's just one file, I only need to compile the file into a .class file to run it from the cmd line. I don't need to make a .jar file.

The .java file runs fine inside Eclipse, so now I need to make it run from the windows command line.

I tried compiling it using

javac -classpath C:WDJarFilesselenium-server-standalone-2.42.2.jar TasksCreateAssignments.java

but got this error

TasksCreateAssignments.java:23: error: package org.apache.poi.hssf.usermodel does not exist

how can I can fix that?

View Replies View Related

Returning Input Class From HTML Using Selenium

Dec 1, 2014

This is my first Java Application. What i am trying to do is log into my dummy trading account, find a trade based on a ticker and then return the value.

Here is what i have so far

import java.io.IOException;
import org.openqa.selenium.By;
import org.openqa.selenium.Dimension;
import org.openqa.selenium.Point;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;

[Code] ....

The immediate issue I am having is using Selenium to click on the Login Button. The tag seems to be returning as a class and not an id.

<input class = "inline faux-button secondary" type ="submit" tabindex="3"
onclick="javascript:return Go()" value="Login" name="submit_button"></input>

I have been able to use just the findElement by id on other accounts I have, however you have to pay like £100 a year to stop being timed out every 10 seconds, so I get stuck after logging in.

iii.co.uk doesnt have a time out function so trying with this. How to access the input class above.

The error I am getting from Selenium is:

org.openqa.selenium.NoSuchElementException: Unable to locate element: {"method":"class name","selector":"inline.faux-button.secondary"}
Command duration or timeout: 47 milliseconds

[Code] ...

View Replies View Related

Browser Automation / Embedding Into GUI / Attaching To Existing Browser Window

Aug 7, 2014

What best API or whatever you call for browser automation? I mean clicking links, filling forms, gathering sources and other info. I already tried selenium WebDriver. It have all needed functions but there is no feature like attaching code into already opened browser so even doing google search it opens new browser window (opening takes ~5-10secs). Also I believe that there is no way that I could embed that browser into GUI.

Also tried WebSpecs and old Watij but also didnt found any way to attach or embed browser into my GUI.

So what I need is that I could create GUI with embeded browser and bunch of buttons. I click buttons then embeded browser clicks links, gets info etc.

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved