Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8581041
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:57:19+00:00 2026-06-11T20:57:19+00:00

I wrote a simple perl script with the WWW::Selenium module that interacts with the

  • 0

I wrote a simple perl script with the WWW::Selenium module that interacts with the Selenium RC server and goes to a webpage and downloads the source. I am able to do this with HTML pages. However, I have an XML page I want to download the source of. This is obviously not possible with the ‘get_source_html()’ function. Below is the script of what i want to do:

#!/usr/bin/perl -sw
use WWW::Selenium;

print "\n setting up Selenium...\n";
my $sel = WWW::Selenium->new( host => "localhost",
port => 4444,
browser => "*firefox",
browser_url => "http://www.google.com",
);

print " starting Selenium...\n";
$sel->start;

$sel->open('someXMLpage...');
$sel->wait_for_page_to_load();

my $xml = $sel->get_html_source();
print $xml;

As you can see the get_html_source is obviously a problem since it will return an error saying that the page is not html. Is there some way that I can just download the current page visible in the browser regardless of the type of page(like the click ‘view source’ in firefox or even better: some get_source() function)? Also note, that the url I need to use does not end in something like a ‘.xml’ file. The page is generated on the fly if that means anything…

Any wisdom greatly appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T20:57:20+00:00Added an answer on June 11, 2026 at 8:57 pm

    You want the Selenium RC get_page_source() function. It works even if the “page” isn’t HTML (even plain text, not just XML).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wrote a very simple Perl script that contains the following line. my $q_it
I just wrote a very simple perl tk script to read a huge text
I wrote the following Perl script (below) in order to create simple XML file.
I am trying to write a simple Perl script that reads a *.csv, places
I have a quite simple perl script, that in one function does the following:
I'm trying write a simple perl script that reads some fields from a password
So I wrote a simple html 1.0 server, and I have some perl scripts
I wrote a simple perl script but i am getting this runtime error: Can't
I am very newbie to Perl. I wrote a very simple Perl program (script):
I wrote a very simple perl script, and now I want to make it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.