0

I have a long text to be filled multiple times in text area.

I am using send_keys method to input the long text in Text area using chrome web driver [Version: 80.0.3987.106] on windows 10 64 bit machine. But the speed of entering text in Text area is too slow.

Example:

message="Selenium Python send_keys method is too slow"

driver.find_element_by_xpath("//*[@id="keyIssueManagerArea"]/table/tbody/tr[2]/td[6]/table/tbody/tr[1]/td[3]/table/tbody/tr[2]/td[1]").send_keys(keyissuemessage)

My HTML:

<textarea name="issueComment_3308_15996_0" style="width:100%;height:auto;min-height:50px;overflow:hidden;resize:none;" onkeyup="resizeHeight(this);">
'Some Text to Be filled'
</textarea>

Please suggest how to speed up entering the long text in Text Area using selenium python when we know xpath ?

Regards, N.Dilip Kumar.

Greg Burghardt
  • 17,900
  • 9
  • 49
  • 92
  • Cant, you use another locator strategy? Are you sure your page is loading before performing send key action? Could be page is taking too long before performing sendkey operation. Your XPath is very complex use css selector instead of XPath – SeleniumUser Feb 28 '20 at 15:20
  • Which version of Chrome and ChromeDriver are you using? You need to make sure you are using the correct version of the web driver for the major version of Chrome, and Chrome likes to auto update itself. – Greg Burghardt Feb 28 '20 at 16:22
  • 1.Hope i can't use another locator strategy. I have many text area's to be filled whose xpath,name etc is dynamic. – Dilip Kumar Noone Feb 29 '20 at 08:24
  • 1.Hope i can't use another locator strategy. I have many text area's to be filled whose xpath,name,css-selector etc is dynamic. 2.page loading is not taking more time before performing sendkey operation. 3.My Google Chrome is up to date & Version 80.0.3987.122 (Official Build) (64-bit) . Chrome driver Version i downloaded from below URL.[Downloaded chrome driver version : 80.0.3987.106] https://sites.google.com/a/chromium.org/chromedriver/downloads So, Please clarify how to proceed further. – Dilip Kumar Noone Feb 29 '20 at 08:32
  • I used xerox module to copy the text in the text input area as below:pip install xerox.import xerox as x , x.copy(keyissuemessage) driver.find_element_by_xpath(textarea).send_keys(Keys.CONTROL, 'v') This makes faster way of entering text in text input when i know only xpath. Thanks. – Dilip Kumar Noone Feb 29 '20 at 11:14

0 Answers0