简体   繁体   English

用WWW :: Firefox :: Mechanize在文本框中输入文本

[英]Typing in text into a field with WWW::Firefox::Mechanize

I am using WWW::Mechanize::Firefox to do some automation task on a website. 我正在使用WWW::Mechanize::Firefox在网站上执行一些自动化任务。

Now I am facing the problem that I need to simulate the entering of characters into an <input type="text"> field. 现在,我面临的问题是我需要模拟在<input type="text">字段中<input type="text">字符。 This is because the typing causes the site to do some AJAX calls to the webserver. 这是因为键入会导致站点对Web服务器进行一些AJAX调用。

So, is there a way to use W::M::F to have it enter or type characters. 因此,有一种方法可以使用W :: M :: F使其输入键入字符。

I managed to find a way around with Win32::GuiTest . 我设法找到解决Win32::GuiTest I use this module to simulate the necessary key strokes with SendKeys . 我使用此模块通过SendKeys模拟必要的击键。 – René Nyffenegger –RenéNyffenegger

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM