Questions tagged [mozrepl]

MozRepl (Mozilla Plugin) lets you program Firefox and other Mozilla-based applications from the inside using a telnet client.

MozRepl Is a plugin for Mozilla-based applications. It is an read/eval/print loop, that acts like a telnet server within e.g. Firefox.

The server allowing you connect to the "telnet server" using any application and send commands to Firefox. Commands sent to Firefox by MozRepl are executed as if it was run from the browser.

Example of client: WWW::Mechanize::Firefox what uses MozRepl and allows automate Firefox via perl through the Mozrepl plugin.

34 questions
9
votes
1 answer

Getting rendered HTML with MozRepl and Mechanize::Firefox

I've just been introduced to the wonders of MozRepl used in conjunction with Perl's WWW::Mechanize::Firefox, and was trying to figure out how to use it to crawl GWT pages (e.g.,:…
Vijay Boyapati
  • 7,632
  • 7
  • 31
  • 48
8
votes
1 answer

How can i use Unicode string key In Javascript Object?

I want to use unicode string in Object as key, something as: var t = {"姓名": "naitong"}; it's ok , t["姓名"] return "naitong" but Object.keys({"姓名": "naitong"}) I got " ", a blank string Anyone knowes why? Editting: I install firebug and try it in…
Naitong Xiao
  • 81
  • 2
  • 4
7
votes
1 answer

Setting up headless Firefox with MozRepl

I would like to run a crawler that can handle javascript created html in an environment without an X server. I know I can run Firefox in a headless state under xvfb, and I know how to install MozRepl on Firefox and interact with it using…
Vijay Boyapati
  • 7,632
  • 7
  • 31
  • 48
5
votes
1 answer

Get URL of currently active chromium or chrome tab from external process

How can I get the current chromium tab URL from an external process in linux programmatically? There are many similar questions to this one, but I haven't found any with the following requirements Solution should work from outside of the chrome…
ealfonso
  • 6,622
  • 5
  • 39
  • 67
5
votes
1 answer

mozrepl: loop through all tabs in all windows of firefox

I know that when I enter a mozrepl session I'm in the context of one particular browser window. In that window I can do var tabContainer = window.getBrowser().tabContainer; var tabs = tabContainer.childNodes; which will give me an array of tabs in…
D Pao
  • 53
  • 3
3
votes
1 answer

WWW:Mechanize:Firefox fails connection

I am creating a short Perl Script. I am using the WWW::Mechanize::Firefox module. When I instantiate the object, I believe the module fails to establish a connection with the MozRepl component in Firefox. My code is as follows: use…
iamio
  • 1,171
  • 10
  • 8
3
votes
1 answer

WWW::Mechanize::Firefox troubleshooting

I have MozRepl installed in my browser and set to start on startup and accept outside connections. So my questions are as follows 1) will simply running the code my $mech = WWW::Mechanize::Firefox->new(); launch the firefox browser? 2) I have set…
Marcus Lim
  • 567
  • 2
  • 5
  • 14
3
votes
3 answers

Programmatically open Firefox and do POST request? [idea: MozRepl, suggestions?]

In my application, I need to have a button which opens Firefox (if not already open), executes a POST request including a file upload, and displays the resulting page to the user (for further navigation). From what I've found until now, this seems…
meow
  • 925
  • 7
  • 22
2
votes
1 answer

Is it possible to take a webpage's screenshot without a graphical interface?

I have interest to programmatically take a screenshot of a webpage using perl. I have come across this solution: use WWW::Mechanize::Firefox; use Path::Class qw/file/; my $mech = WWW::Mechanize::Firefox->new( bufsize => 10_000_000, # PNGs might…
KingsInnerSoul
  • 1,373
  • 4
  • 20
  • 49
2
votes
1 answer

Emacs: what is the conventional way of receiving output from a process?

My aim is to get the output from a process in Emacs. For example, M-x run-python gives me a python shell *Python* that I can send python code to. If I send print "hello world" to *Python*, I hope Emacs can know the result once the execution is…
Wenshan
  • 690
  • 6
  • 13
2
votes
1 answer

trouble installing MozRepl

I've been trying to install WWW::Mechanize::Firefox through CPAN and I am having trouble installing the dependency MozRepl. The installation goes through but the tests all fail, and when I force install it and run my perl script, I run into an…
Tim Hui
  • 125
  • 1
  • 10
2
votes
2 answers

How can we tell WWW::Mechanize::Firefox to not wait for a response or a postback?

Hi I am using a loop to get various pages. The code: while($stm->fetch()) { $mech->get(**#TheURL**); $mech->select( 'this', 'that' ); $mech->tick( 'this' => undef ); $mech->tick( 'this' => undef ); …
tread
  • 10,133
  • 17
  • 95
  • 170
2
votes
1 answer

Simplest way to launch Firefox, drive 3rd party site using privileged nsI* APIs

What's the simplest way to launch Firefox, load a 3rd party website (which I'm authorised to "automate"), and run some "privileged" APIs against that site? (e.g: nsIProgressListener, nsIWindowMediator, etc). I've tried a two approaches: Create a…
David-SkyMesh
  • 5,041
  • 1
  • 31
  • 38
1
vote
1 answer

get page html with MozREPL using Firefox 55.0.3 (64-bit)

Is this possible at all? MozREPL is now apparently incompatible with this version of Firefox, but Firefox is very hard to stop updating. I want to automate a browser again, not a headless one. Is there any browser I can use at all, where i can just…
Richard
  • 135
  • 2
  • 11
1
vote
0 answers

Executing JavaScript function using MozRepl and Perl (WWW::Mechanize::Firefox)

I am using the following Perl snippet to execute a JavaScript function using MozRepl. However, I get the error message "MozRepl::RemoteObject: TypeError: myFunction is not a function at test.pl line 16." What am I doing wrong? use v5.10; use…
user1769925
  • 588
  • 1
  • 6
  • 15
1
2 3