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
Save Publishign site as template in SharePoint 2010
RealPlayer 11 keeps asking to add Downloader Agent
iSCSI Performance Tuning
What Should the Title Be
How to view a .pwi file in XP: Office 2007?
In Excel 2007, remove buttons copied from websites.
Exchange 2010 CAS and certificates
How to generate a heap dump in JBoss
ASP.NET JQuery modal
fully uninstall Acrobat 8.2.2