LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-17-2009, 03:49 AM   #1
barde
LQ Newbie
 
Registered: Aug 2008
Posts: 2

Rep: Reputation: 0
Can we open a browser (firefox/IE) & enter URL in it via shell/PERL script.


I have read the similar threads related to my question.

All I could understand is we cannot do it via shell or perl.

Can some one please assist me telling how to do it via some other way.

Thank you ..
 
Old 02-17-2009, 03:56 AM   #2
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
What do you want to do? And why do you want to write a script that will open firefox and do nothing?
You can open firefox from script. But you will need X running.
But you cant ask it to open website from script. Could you explain your need behind?
 
Old 02-17-2009, 03:58 AM   #3
Maligree
Member
 
Registered: Mar 2008
Distribution: Gentoo, CentOS, Fedora, Arch
Posts: 231
Blog Entries: 1

Rep: Reputation: 42
http://www.firefoxfacts.com/2008/01/...-firefox-tips/
http://kb.mozillazine.org/Command_line_arguments

From what I see you can simply specify the URL as an argument.

Code:
firefox -url http://linuxquestions.org

Last edited by Maligree; 02-17-2009 at 04:02 AM. Reason: checked.
 
Old 02-17-2009, 10:25 AM   #4
bach-fiend
LQ Newbie
 
Registered: Feb 2009
Location: St Paul, Minnesota, USA
Distribution: Redhat Fedora 10; someday planet CCRMA
Posts: 11

Rep: Reputation: 0
Yes. Browsers do not browse only the web, they can browse local files too. I use this functionality in Windows by associating *.htm and *.html files with Internet Explorer, or with Opera, or whatever. When looking around in my file system I look at html files by double clicking on them, or by right clicking and choosing Open or Open-With... from the popup menu. This opens the [registered or selected] application passing as argument the name of the file I clicked on.
 
Old 02-17-2009, 11:02 AM   #5
monsm
Member
 
Registered: Feb 2005
Location: London, UK
Distribution: Gentoo
Posts: 568

Rep: Reputation: 37
On my Gentoo (Gnome) box I can also righ-click on a web address printed out in the terminal window and open that link in my web browser...

Mons
 
Old 02-18-2009, 03:57 AM   #6
barde
LQ Newbie
 
Registered: Aug 2008
Posts: 2

Original Poster
Rep: Reputation: 0
hello Maligree,

That worked for me...
The command:-
firefox url https://IP address//
It opened the url in firefox browser.
THANK YOU SO VERY MUCH.



Hello linuxlover.chaitanya,

I actually was thinking of automating some actions of web testing.I want to write my own test scripts for the manual testing on my project application which has a GUI.

In short, I want to learn what exactly the web testing tools do. To name a few - imacros, sahi, selenium etc. So, was just trying to get working the initial steps.after openeing the url -- I want to login and carry out few steps. For this,I want to write scripts.


Also, got to know how to open a IE on windows via command line.
--Go to the dir which has IE (say crogram files)
--Run the .exe of IE
--This opens a new IE instance.

Thank you all of you once again.
 
Old 02-18-2009, 06:21 AM   #7
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,411

Rep: Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397
If you want to be able to drive an interactive/CGI page from a program ie fill in fields, do a submit etc, try http://search.cpan.org/~petdance/WWW...W/Mechanize.pm and friends from Perl.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL Updates With Null When Perl Script Run From Shell Script ThisGuyIKnow Programming 6 08-12-2008 10:56 AM
How to enter a URL in to the "exceptions" box in Firefox royeo Linux - General 1 12-15-2006 06:03 PM
Since I installed fireFox and made it my default browser I can't enter the IE. michael! Linux - General 1 10-12-2006 03:55 AM
Open an URL in the default browser guasqui Programming 2 03-22-2006 12:54 PM
open a URL from shell plisken Linux - General 3 11-10-2005 02:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration