Microsoft
Software
Hardware
Network
Question : Find button on form
Hi,
I'm trying to find a button on a webpage, so I can click it. First I find the form where it's contained.
I use this code:
final HtmlButton newDocButton = Form1.getButtonByName("cmd
NewDoc");
assertNotNull("newDocButto
n doesn't return anything", newDocButton);
System.out.println("Found newDocButton.");
newDocButton.click();
But I get this error message:
Exception: com.gargoylesoftware.htmlu
nit.Elemen
tNotFoundE
xception: elementName=[button] attributeName=[name] attributeValue=[cmdNewDoc]
In what other way can I go looking for it?
Thank you,
Ana
Related Solutions:
HtmlUnit to test webpages
Answer : Find button on form
try:
HtmlSubmitInput button = form.getInputByName("cmdNe
wDoc");
Random Solutions
XP runs slow error 0XC000005e,The Security System detected an attempted downgrade attack for server
osx system no longer logging into windows domain
capture value of checked items in checklistbox
how to make background black?
split comma delimited values into seperate columns in SQL 2005
Question about Exchange 2010 mailbox move.
Website doesnt display correctly in IE7
How to sendkeys commands to two sequential dialog boxes
I need your advice in this class php
get 550 5.7.1. Unable to relay for specific domains....