Click Link invokes command shell

37 views
Skip to first unread message

Dev..

unread,
Apr 17, 2013, 1:38:15 PM4/17/13
to seleniu...@googlegroups.com, selenium-...@googlegroups.com, selenium-...@googlegroups.com
Hello
  I have a scenario where clicking on a link invokes a command shell, where i have to execute few commands(lets say ls -ltr).is there any way can we accomplish this using webdriver?

here is the HTML code

<table width="100%" border="0" title="Command Shell - Click to launch" onclick="document.location.href='/abc/ui/bonsai/launch.do?type=1&task=00000017';return false;" onmouseout="this.style.cursor='default'; this.style.backgroundColor='';" onmouseover="this.style.cursor='pointer'; this.style.backgroundColor='#eee';" style="table-layout: fixed; cursor: default;">

where /abc/ui/bonsai/launch.do?type=1&task=0000001 is the command shell

Regards
-Dev

Ken Pace

unread,
Apr 17, 2013, 2:58:13 PM4/17/13
to seleniu...@googlegroups.com, selenium-...@googlegroups.com
No, you'll need AutoIT or another tool capable of interacting with the operating system.

David

unread,
Apr 17, 2013, 7:03:27 PM4/17/13
to seleniu...@googlegroups.com, selenium-...@googlegroups.com
What browser is this executed from? And what command shell is this? Windows, Linux/Mac?

Perhaps I'm inexperienced, but I fail to see how you could execute/launch a command shell on the browser/client computer from a browser link, unless you happen to be running a Microsoft .HTA application (HTML web app set to run locally w/ minimal security restrictions).

Or were you referring to the browser link causing a command shell to open on the web server computer (or execute a shell command on the web server)? This case I can see as valid, though you typically won't see it in action as what executes will typically be like a background process.

On Wednesday, April 17, 2013 10:38:15 AM UTC-7, Dev wrote:

Mike Riley

unread,
Apr 22, 2013, 4:24:04 PM4/22/13
to seleniu...@googlegroups.com, selenium-...@googlegroups.com
Since you seem to be using Linux, I think you will need to use the Robot class.  I have never used it myself, but I believe it allows for interaction with System GUI panels.  I am assuming you are using Java.

Mike


On Wednesday, April 17, 2013 10:38:15 AM UTC-7, Dev wrote:

Dev..

unread,
Apr 23, 2013, 12:02:19 PM4/23/13
to seleniu...@googlegroups.com, selenium-...@googlegroups.com
Thanks all for your reply.
@mike yes i am using Java on ubuntu.infact i have tried robot class extensively, somehow its not working out.
Tried autoit on windows.its working like champ.now would like to know if there will be any Autoit replacement for linux.

Thanks
-Dev

Regards
-Dev


--
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/msg/selenium-users/-/us_zFFWEmz0J.

For more options, visit https://groups.google.com/groups/opt_out.
 
 

Krishnan Mahadevan

unread,
Apr 23, 2013, 12:52:13 PM4/23/13
to Selenium Users
Dev,
Are you making use of FirefoxDriver to run tests against this UNIX box (or) are you using RemoteWebDriver ?

If its just a shell script that needs to be executed [assuming its responses are NOT updated to the UI] why dont u just trigger an ssh operation into that box, execute this shell script directly [ You can always query the actual script from the UI if needed ]

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
Reply all
Reply to author
Forward
0 new messages