0
WWW :: Mechanize :: Firefox를 사용 중입니다. ID로 입력 내용을 입력 한 후 링크 마녀를 누르는 방법, JS를 사용하여 페이지를 제출 하시겠습니까?WWW :: Mechanize :: Firefox ID로 입력 내용 넣기
<input id="my_input" type="text" class="some_class"/>
<a id="send_with_me" href="#">Press me</a>
어떻게 할 수 있습니까?
감사 보로딘의 요청에
답변 :
my $mech = WWW::Mechanize::Firefox->new(
activate => 1
);
my $content = $mech->get("http://some_url.com");
$mech->field(".my_select_element_by_class", 1); #select element from select by class
나는 ID로 입력에 값을 넣고 싶습니다. 이런 식으로 뭔가 :
$mech->field("#my_input", 100);
$mech->some_method_witch_press_href("#send_with_me");
당신이 쓴 그 코드를 보여 당신이 겪고있는 문제를 설명하십시오. – Borodin
내 게시물을 편집했습니다. 감사! – user3054412