You can use this:

 

      HtmlUnitElementImpl htmlUnit = (HtmlUnitElementImpl)
getElementById("xxx");

            try {

                  setTextField("otpTokenPin", "");

                  htmlUnit.getHtmlElement().type("gfhghf");

            } catch (Exception e) {

                  e.printStackTrace();

            }

            htmlUnit = (HtmlUnitElementImpl) getElementById("ddd");

            try {

                  htmlUnit.getHtmlElement().click();

            } catch (IOException e1) {

                  e1.printStackTrace();

            }

 

 

From: S.R.G. Manoj [mailto:mano...@hotmail.com] 
Sent: Wednesday, September 26, 2012 11:22 AM
To: jwebunit-users@lists.sourceforge.net
Subject: [HCSPAM] - [JWebUnit-users] Triggering javascript events -
Email found in subject

 

Hi,
 
Can we trigger a javascript event using jWebUnit? 
In my case i have a onkeyup event for a text box and when i this event
is triggered a button needs to be enabled, 
but when i set the value for the text box using
'setTextField("textfieldName","value") the event is not getting
triggered.
 
 
Thank you!

Regards,
Manoj 


DISCLAIMER AND PRIVILEGE NOTICE: This e-mail and any files transmitted with it 
contain confidential, copyright, proprietary and legally privileged 
information. It should not be used by anyone who is not the original intended 
recipient. Any use, distribution, copying or disclosure by any other person is 
strictly prohibited. If you receive this transmission in error, please notify 
the sender by reply email and then destroy the message. Opinions, conclusions 
and other information in this message that do not relate to official business 
of Seasia Consulting and its subsidiaries,  Internet communications cannot be 
guaranteed to be timely, Secure, error or virus-free. The sender does not 
accept liability for any errors or omissions."

Use GROTAL.COM-   Make Life Easy !!!


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
JWebUnit-users mailing list
JWebUnit-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jwebunit-users

Reply via email to