473,395 Members | 1,595 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,395 software developers and data experts.

how to get table name using Win32::IEAutomation

8
Hi all,
I have to get all table and it's row and column entry.
let say this is the url http://hg.sagemath.org and it has
four table name,Description,Contact,Last change and each table has some content.i have to get all name's content.
how i can do this.i am using http://search.cpan.org/~prashant/Win...EAutomation.pm
i tried below code but i got Can't call method "rows" on an undefined value this error.

Expand|Select|Wrap|Line Numbers
  1. use Win32::IEAutomation;
  2.        use Win32::IEAutomation::Table; 
  3.        use Win32::IEAutomation::Element;
  4.       use Win32::IEAutomation::WinClicker; 
  5.  
  6.         # Creating new instance of Internet Explorer
  7.         my $ie = Win32::IEAutomation->new( visible => 1, maximize => 1);
  8.  
  9.         # Site navigation 
  10.        $ie->gotoURL('http://hg.sagemath.org');  
  11.         $ie->WaitforDone;
  12.        $mytable= $ie->getTable("class:","Name");
  13.  
  14.        $my_row = $mytable->rows(2);



Please anyone help me on this topic.
Thanks,
Aug 14 '10 #1
2 2998
ketanm
8
Hi ,
i tried with below code and it works but i am not getting individual table's content.


code.........

Expand|Select|Wrap|Line Numbers
  1. use LWP;
  2.        use Win32::IEAutomation;
  3.        use Win32::IEAutomation::Table; 
  4.        #use Win32::IEAutomation::Element;
  5.        use Win32::IEAutomation::WinClicker; 
  6.       use HTML::TokeParser;
  7.       use HTML::TableExtract;
  8.        use HTML::Parser; 
  9.         use LWP::Simple;
  10.         # Creating new instance of Internet Explorer
  11.         my $ie = Win32::IEAutomation->new( visible => 1, maximize => 1);
  12.  
  13.         # Site navigation 
  14.        $ie->gotoURL('http://hg.sagemath.org');  
  15.         $ie->WaitforDone;
  16.  
  17.        #print  $ie->Content();
  18.  
  19.  
  20.      my $page = get('http://hg.sagemath.org') ||
  21.      die "Could not load URL\n";
  22.  
  23.  
  24.       my $p = HTML::TokeParser->new(\$page) ||
  25.      die "Parse error\n";
  26.  
  27.  
  28.  
  29.        #$p = HTML::TokeParser->new("$ie->Content()");
  30.         while (my $token = $p->get_tag("<td><a ")) {
  31.              #my $url = $token->[1]{href} || "-";
  32.              my $text = $p->get_trimmed_text("/</a></td>");
  33.              print " $text\n ";
  34.   }
Aug 15 '10 #2
numberwhun
3,509 Expert Mod 2GB
@ketanm Indenting your code does not add the proper code tags. You need to use them whenever posting code in the forums. Please read the FAQ for the proper way to ask questions.

Regards,

Jeff
Aug 19 '10 #3

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

Similar topics

0
by: Rob | last post by:
I recently downloaded some code from codeproject written by Leslie Hanks. From this code a class written in C# contains many subroutines that automate the web pages downloaded into Internet...
1
by: Rob | last post by:
Hello, I have a C# file that I want to build into a dll assembly. The big problem I have in doing this are the 2 required references in the file. One reference is to the Interop Assembly...
1
by: siamps | last post by:
Hi, I have used IEAutomation module to automate IE broser. But, How to access the javascripts running inside some pages?. Can I access those methods defined inside the javascript?.
2
by: pandurusankar | last post by:
Hi, Need a pointer for managing File type button in HTML page, i am able to handle all the components in HTML using IEAutomation module like: text box, links, radio button, list box etc. but i...
4
by: upendrasingh | last post by:
hi all, i am writing an automation framework in perl that includes web browsing.i am using Win32::IEAutomation package for that purpose.actually the goal is to download a cab file from...
0
by: tgkprog | last post by:
hi i'm trying to use Win32::IEAutomation to automate clickbank.com navigation and page saving i can login and go to the https://www.clickbank.com/account/showTransactions.htm page but cannot...
4
by: jyo123 | last post by:
Hi, Is there any way to write perl script to save the popup window into specified location.Please anyone help on this. Thanks is advance.
8
by: AAaron123 | last post by:
If IE is open I'd like my app to receive an event or otherwise know when IE receives a mouse click. Is that fairly easy to do? Thanks in advance
0
by: madhu188 | last post by:
I am using Win32::IEAutomation My script opens IE browser taking URLs from a notepad. While running this script the following error is thrown "Can't call method "readystate" on an undefined...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.