Python Selenium Submit Keys Providing Size Warning

I load content through the selenium python element.send_keys(content) binding, but I get a content size error.

My data will be more.

Can you give me a solution through which I can add the selected item to pieces, and not put the complete and whole data in my selected field, where I want to enter the data?

I mean, I want to put the data in the selected element in pieces, and not put it in one action.

Getting this error seems not very good for my system and python.

But I'm not so sure about that. Just want to know if this is true?

Please give me the correct idea how I can send data via send_keys in pieces. This is very necessary and necessary to solve the problem.

Thank you for your help.

 [1560:9968:1211/012355:ERROR:latency_info.cc(157)] RenderWidgetHostImpl::OnSwapC ompositorFrame, LatencyInfo vector size 161 is too big. [1560:9968:1211/012357:ERROR:latency_info.cc(157)] RenderWidgetHostImpl::OnSwapC ompositorFrame, LatencyInfo vector size 419 is too big. [1560:9968:1211/012402:ERROR:latency_info.cc(157)] RenderWidgetHostImpl::OnSwapC ompositorFrame, LatencyInfo vector size 640 is too big. [1560:9968:1211/012422:ERROR:latency_info.cc(157)] RenderWidgetHostImpl::OnSwapC ompositorFrame, LatencyInfo vector size 169 is too big. [1560:9968:1211/012424:ERROR:latency_info.cc(157)] RenderWidgetHostImpl::OnSwapC ompositorFrame, LatencyInfo vector size 448 is too big. [1560:9968:1211/012428:ERROR:latency_info.cc(157)] RenderWidgetHostImpl::OnSwapC ompositorFrame, LatencyInfo vector size 557 is too big. 
+5
source share
2 answers

I know I'm late for this question, but recently I had this problem. I managed to get around this problem by clicking on the line that I use for SendKeys on 128 fragments and sending them instead of whole lines.

I worked in C #, but I'm sure you can port this code, or if someone else has a similar problem.

This is the fragment code

 static IEnumerable<string> ChunksUpto(string str, int maxChunkSize) { for (int i = 0; i < str.Length; i += maxChunkSize) yield return str.Substring(i, Math.Min(maxChunkSize, str.Length-i)); } 

Taken from Splitting a String into Chunks of a Specific Size

+1
source

@ ulf-gjerdingen asked to answer python for the same thing, I think it answers it:

How do you break a list into pieces of uniform size?

The answer I chose is using boltons.iterutils, installing bolts with pip, and then:

 from boltons import iterutils somelong_str = 'veeeeeeeeeeeeeeeeerrrrrrrrrrrrrrrrrrrrrrrrrrrrrrytttttttttttttttt loooooooooooong stringggggggggggggggggggggggggggggggggggggg to ensurrrrrreeeeeeeeeeeeeeeeeeeeeeeeee it will be chuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuncked' iterutils.chunked(somelong_str, 128) it will be chuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuncked' from boltons import iterutils somelong_str = 'veeeeeeeeeeeeeeeeerrrrrrrrrrrrrrrrrrrrrrrrrrrrrrytttttttttttttttt loooooooooooong stringggggggggggggggggggggggggggggggggggggg to ensurrrrrreeeeeeeeeeeeeeeeeeeeeeeeee it will be chuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuncked' iterutils.chunked(somelong_str, 128) 

In this case, it will return a list of strings.

To get additional help from the python console:

 help(iterutils.chunked) 
+1
source

Source: https://habr.com/ru/post/1237881/


All Articles