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
I recieved an email from someone: how can i see from server who sent it?
Integrating projects
Windows 7 64 bit Error Lockup Last Ideas
Jquery Easy Slider Show Next Slide
How many types of pages r there in SQL Server?
Quartz Job Scheduler ShutdownHookPlugin
Best way to swap out SBS servers
iTunes playlist gone but music library intact, how to recreate from iphone
Hyper-v virtual m/c issues
What does it mean if I am receiving output errors on all of my Cisco Aironet 1130AG?