473,230 Members | 1,840 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,230 software developers and data experts.

Unable to get web page element while running perl script with selenium RC server .

Hi All,

I am facing a problem while running a perl script through selenium RC server .

I recorded oone log in test case with slenium IDE and run it after that with the ide only and it worked fine .

After I exported that test case as a perl script . I installed all the required modules (like Test::WWW::Selenium,Test::More,Test::Exception)by PPM GUI (As I am using active perl 5.10 on winxp).I run the Selenium Rc server and tried to execute my below code .
Expand|Select|Wrap|Line Numbers
  1. use strict;
  2. use warnings;
  3. use Time::HiRes qw(sleep);
  4. use Test::WWW::Selenium;
  5. use Test::More "no_plan";
  6. use Test::Exception;
  8. my $sel = Test::WWW::Selenium->new( host => "localhost", 
  9.                                     port => 4444, 
  10.                                     browser => "*firefox", 
  11.                                     browser_url => "http://localhost:28080/" );
  13. my $s = $sel->open_ok("/interop/index.jsp");
  14. print " \n Test Script \n ";
  15. print " \n \n my var $s \n \n";
  16. $sel->set_speed("1000");        # without this line, everything will error out.
  17. $sel->wait_for_page_to_load_ok("100000");
  18. sleep (50);
  19. $sel->type_ok("bpm.Logon.1.txtPassword", "password");
  20. $sel->click_ok("bpm.Logon.1.btnLogon");
and after executing that code the broswer opens that url page and the status shows as "done". But In that opened page no UI elements are there like text box and buttons , It is a blank page .

The console result shows :
Expand|Select|Wrap|Line Numbers
  1. D:\selenium_sc_HSS\RC>perl pl3.pl
  2. ok 1 - open, http://localhost:19000/interop/index.jsp
  4.  Test Script
  7.  my var 1
  9. ok 2 - wait_for_page_to_load, 100000
  10. # Error requesting http://localhost:4444/selenium-server/driver/:
  11. # ERROR: Element bpm.Logon.1.txtPassword not found
  12. not ok 3 - type, bpm.Logon.1.txtPassword, password
  13. #   Failed test 'type, bpm.Logon.1.txtPassword, password'
  14. #   at pl3.pl line 27.
  15. # Error requesting http://localhost:4444/selenium-server/driver/:
  16. # ERROR: Element bpm.Logon.1.btnLogon not found
  17. not ok 4 - click, bpm.Logon.1.btnLogon
  18. #   Failed test 'click, bpm.Logon.1.btnLogon'
  19. #   at pl3.pl line 28.
  20. 1..4
  21. # Looks like you failed 2 tests of 4.
Because of the page element text box with ID "bpm.Logon.1.txtPassword" is not loaded (As I mentioned it is coming as blank page) the script is throwing error as "Element bpm.Logon.1.btnLogon not found"

Can any one help me on this why the page is not getting loaded fully though the firefox browser status is showing "done" and the same test case is loading the page fully with selenium IDE .

Advance thanks for any input on this..!!
Oct 25 '10 #1
0 2029

Sign in to post your reply or Sign up for a free account.

Similar topics

by: von | last post by:
Is it possible to run a Perl script from within a javascript? I have an existing javascript that provides some data - and I want to write that data to a text file on my server via a Perl script...
by: Thomas Blabb | last post by:
Sorry for this question but how do I write a simple "Hello world" HTML page from a perl script? In other words if I click in an already existing html page on a link like: .... <a...
by: carllucas | last post by:
I have no exprience with perl. What I'm trying to do is have a script/program constantly (perpetually) running on my server so that it performs a routine (like every hour) and automatic check of...
by: jman | last post by:
i've got a script that runs for a while... each time thru a loop - i'd like to update a page element (i.e. a progress bar). but it doesn't seem to happen - because i think pages are not...
by: satish2112 | last post by:
following is my Html code: <form name="form100" method="post" action="script.pl"> <textarea cols = "160" rows="12" name="TextArea1" > </textarea> <input align = "left" name="UpdateButton"...
by: Tension | last post by:
Hi. I have a Perl script that starts a build process (plus a lot of other things). The build process needs a few environment variables set. This is done automatically in a buildEnv.bat script...
by: tudorbalan | last post by:
I'm a complete beginner in Perl.In fact... I just need a perl script to upload files to server without having to use html <input type="file"> tag. I found a script...it works when I run it in cmd...
by: fortwilliam | last post by:
I have a newsletter system and want to have it work automatically. what I have so far works with a visitor to a page with a tiny iframe in it. This iframe calls up the send.pl newsletter script....
by: mithunmo | last post by:
I am trying to automate the process of filling up the webforms and do a submit . I have the below program written but If I run the program . I get the following error message Can't call method...
by: vijayarl | last post by:
Hi All, i have the following software installed in my system : 1.OS: Win2k 2.Eclipse Version used :3.4.0 & even the perl too... 1. I have imported the my own perl project in Eclipse, when i...
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.