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
Exchange database backup failing with Arcserve v15
How to block USB Disks using Windows 2008 R2 Domain Controller Group Policy
VMware Workstation 7.1 Won't Install
Why won't Exchange Transport service start in Exchange 2007 on our SBS 2008 server ?
VMware ESXi4 Backup
How can i add column name in list generic?
How to use Outlook VBA to select messages in an Outlook folder and run VBA macro
Forefront TMG Client Access
Utilizing array gleamed from GetRows method in Access VBA
Virtual Disk 0 degraded Perc 5i integrated