Bill,
Your logic is flawed. A lack of response here means that people are
busy doing other things. NUMEROUS times I have pointed out to people
that if you post a request for help and there is insufficient
information, the people capable of helping you will skip over your
posting until they have more time available to them. If I'm running a
quick test and have 2 minutes to spare, I'll pop in here and answer a
few questions. If I have to think about what you have posted, figure
out what information is missing and request it from you, I'll wait
until I've completed my current task, at the job I'm PAID to do before
I take time to give FREE help.
You have a call to getSendAmount() which you have not provided the
code. I suspect whatever you are doing in getSendAmount() or in code
you have not included in this code snippet is the problem.
Since you gave the website you are attempting to automate and the
output you received (from code you did not actually post) I was able
to produce:
import
org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
public class Test {
public static void main(String[] args) {
double d[] = { 275.0, 350.0, 400.0, 2624.99, 2624.99, 2624.99,
2775.0, 2850.0 };
WebDriver driver = new FirefoxDriver();
driver.get("
https://www.xoom.com/colombia/fees");
for(int i = 0; i < d.length; i++) {
double sendAmount = d[i];
String s = Double.toString(sendAmount);
WebElement we = driver.findElement(By.id("sendAmount"));
we.clear();
try { Thread.sleep(i * 100); } catch (Exception e) { }
we.sendKeys(s);
String ss = we.getAttribute("value");
if(s.equals(ss)) {
System.out.printf("Match: Got %s, expected %s.\n", ss, s);
} else {
System.out.printf("Wrong: Got %s, expected %s.\n", ss, s);
}
}
driver.close();
}
}
The output for this on Windows 7 with Firefox 12 was:
Match: Got 275.0, expected 275.0.
Match: Got 350.0, expected 350.0.
Match: Got 400.0, expected 400.0.
Match: Got 2624.99, expected 2624.99.
Match: Got 2624.99, expected 2624.99.
Match: Got 2624.99, expected 2624.99.
Match: Got 2775.0, expected 2775.0.
Match: Got 2850.0, expected 2850.0.
If you can post a code snippet which someone can take and run from
their system, we should be able to tell you what you are doing wrong.
Darrell