在IE浏览器的文本框中输入单词时,Selenium中的SendKeys()速度太慢 [英] SendKeys() in Selenium is too slow while typing words into a text box in IE browser

查看:1843
本文介绍了在IE浏览器的文本框中输入单词时,Selenium中的SendKeys()速度太慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在阅读一个包含4或5个单元格的excel行,我正在使用selenium中的sendKeys()将数据逐个发送到网页上的文本框。但它太慢了。假设我从excel中的第一个单元格得到一个单词78845,然后插入文本框时需要5秒,如7然后5秒,然后8再次等待5秒,依此类推。它太慢了。

I am reading an excel row which has 4 or 5 cells and I am sending the data one by one to text boxes on a webpage using sendKeys() in selenium. But its too slow. Suppose I got a word 78845 from the first cell in the excel, then while inserting into the text box it takes 5 seconds like 7 then 5 seconds then 8 again wait for 5 seconds and so on. Its too slow.

这里可以做些什么?

推荐答案


  • 尝试 32位版本的 IEDriverServer

    • Try the 32-bit version of IEDriverServer.

      • 如果没有用,你可以设置功能喜欢,

      • If it doesn't help, you can set Capabilities like,

      DesiredCapabilities capabilities = DesiredCapabilities.internetExplorer();
      capabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS,true);
      capabilities.setCapability(requireWindowFocus,true);
      WebDriver驱动程序=新的InternetExplorerDriver(功能);

      这篇关于在IE浏览器的文本框中输入单词时,Selenium中的SendKeys()速度太慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆