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
Does Barack Hussein Obama deserve 4 more years?
Quickr..How do I edit the tabs on the home page of my place? I want to add a tab
Event ID 1030 and 1058 Missing gpt.ini - Group Policy
Require 2 CPUs on an Intel Server SC5520HC Motherboard?
How to collaspe a menustrip in vb.net?
call .rdl with store procedure with parameter
Backup Return of investment
Keystore file to sign jar via a thawte code signing certificate
workgroup computer connected to domain LAN cannot browse web but can resolve IPs
What is my wifi network password?