Thanks, Corion. Can I ask you another question? I can't figure out how to make a particular selection. I know JavaScript is involved on this page, but that's about all I know. I would love a quick answer, but I also would like to find resources to help me better understand the nuts and bolts. If you run this script (remember to have MozRepl 1.1 running), the selection I want is "Saccharomyces cerevisiae(25)", which is on the left side of the page in the scrollbar. It would work equally well for me to select this option by a name or label, or by its position, being the second selection in the list. In the page source, I can see the relevant section (involving a JS function "document.createElement"), but I don't know how to access these elements. I would greatly appreciate help with a solution, and/or simply some advice on resources to help me figure out a solution.
#!/usr/bin/perl use strict; use warnings; use WWW::Mechanize::Firefox; my $mech = WWW::Mechanize::Firefox->new(autoclose => 0); $mech->allow( javascript => 1 ); $mech->get("http://david.abcc.ncifcrf.gov/summary.jsp"); $mech->click({ xpath => ('//*[@href="Upload a Gene List or Population" +]', single => 1), synchronize => 0 }); $mech->form_name('frmManager'); $mech->set_fields( 'pasteBox' => "RRI1, YLR149C, FUN19, YBR285W, ALD3, CUE5, RTC3 +, AIM3, YDL199C, FMP45, AST2, GIP2, YKL091C, YKL133C, GLG2, SYM1, VHS3, YJR124C, MCH1, MHO1, I +KS1, RKM1, STF2, SAC1, ATG7, YAK1", 'Identifier' => "OFFICIAL_GENE_SYMBOL", ); $mech->click ({ xpath => ('//input[@name="rbUploadType" and @value="li +st"]', single => 1), synchronize => 0 }); $mech->click({xpath => ('//*[@value="Submit List"]', single => 1), syn +chronize => 0}); $mech->back;
In reply to Re^2: WWW::Mechanize::Firefox -- how to close firefox browser window
by jbernest
in thread WWW::Mechanize::Firefox -- how to close firefox browser window
by jbernest
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |