Click a button of embeded applet

149 views
Skip to first unread message

techw...@gmail.com

unread,
Aug 9, 2014, 3:05:14 AM8/9/14
to seleniu...@googlegroups.com

By using selenium(chrome driver) I am automating a web page. But in one case the webpage has a code as shown below(java applet). this has a button "Sign"(it has got only one button). I want to click that button.

<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" codebase="http://java.sun.com/update/1.5.0/jinstall-1_5-windows-i586.cab#Version=5,0,0,5" width="130" height="25" name="Applet">
                    <param name="code" value="fjrff">
                    <param name="archive" value="">
                    <param name="mayscript" value="true">
                    <param name="type" value="application/x-java-applet;version=1.6.0-beta2">
                    <param name="scriptable" value="false">
                    <param name="fileNameField" value="up">
                    <param name="certificationChainField" value="ce">
                    <param name="signatureField" value="s">
                    <param name="tokenType" value="tokenType">
                    <param name="ButtonCaption" value="Sign">

                    <comment> <embed type="application/x-java-applet;version=1.5"  <noembed></noembed> </comment>

I tried using

driver.FindElement(By.CssSelector("object[classid='clsid:8AD9C840-044E-11D1-B3E9-00805F499D93']")).Click()

But it didn't work. Is there any way I can click this button?

Is there a way to click on a element by simulating the click using coordinates in selenium?

Krishnan Mahadevan

unread,
Aug 9, 2014, 4:13:50 AM8/9/14
to seleniu...@googlegroups.com
You cannot use WebDriver to interact with Java applets. 

Krishnan M
iSent.iPad.
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/1df1b4e5-12fc-43b0-8dd8-6a7962e272b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

techw...@gmail.com

unread,
Aug 9, 2014, 5:21:06 AM8/9/14
to seleniu...@googlegroups.com
Ok. But is there any option to simulate click by specifying coordinates?

Krishnan Mahadevan

unread,
Aug 9, 2014, 5:59:01 AM8/9/14
to seleniu...@googlegroups.com
I don’t know if you can try clicking on a given co-ordinate especially when that co-ordinate lands up in an applet.
But you can try using this.

        Actions action = new Actions (driver);
        action.moveByOffset (x,y).click ();

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Technical Scribbings @ http://rationaleemotions.wordpress.com/


Reply all
Reply to author
Forward
0 new messages