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
Submit form to external action file and redirect page on one submit button
Windows 7 screen saver goes crazy "Bubbles"
Compare two excel files
Outlook 2007 hangs while sending large emails (only over HTTPS, not over VPN or while on LAN)
Anyone knows what this fruit is called in english and if I can buy it in the USA somewhere even online
couple of things missing from Exchange 2010?
safely shutdown sharepoint on sbs 2003
Inconsistent crystal reports
can read ssl.crt/server.crt and ssl.key/server.key on centos about ssl of apache
Windows 7 WGA says my legitimate copy is NOT GENUINE