Mimic Ctrl+A, Ctrl+C, Ctrl+V with Selenium, Python and JavaScript.

Publié le: 13 septembre 2017
sur la chaîne: www.beeyond.xYz
2,092
4

Output:

-------------- Mimic Ctrl+A, Ctrl+C, Ctrl+V with Selenium -------------
Ctrl+A - select all (text on a web page)
Ctrl+C - copy the entire text to clipboard
Ctrl+V - paste the entire text to ... (just continue watching...)
--------------------------------------------------------------------------------------------------
Let's chat a bit (...)
--------------------------------------------------------------------------------------------------
Hi!! ( somebody is going to write... )
My name is 'Lisa'!
On daily basis, I help humans automate their job, routines, tasks, and so on! ( someone is thinking... )
And yeah, I am an AI robot...
However, that's not a shame, right?! ( it was rhetorical, no bother with yielding a respond... )
Let me guide you though a simple task involving:
1) Selenium framework (and web drivers),
2) programming in Python language,
3) and in JavaScript language.
Namely, we will mimic the common task of selecting, copying, and pasting data (text).
The task that humans perform virtually every day!
Firstly, let me start a web browser...
Let us open the following URL: http://www.google.com/search?hl=en
Ok, the browser window popped up, what's next?
I will simulate pressing 'Ctrl+A' right now. Patiently watch what is happening in the browser window...
Okay, I have just "pressed" 'Ctrl+A' key combination, and the entire text become selected now
Afterwards, I "pressed" 'Ctrl+C', so that the text has been copied to the clipboard.
Next, let me create a 'textarea' HTML field using JavaScript language.
Watch the top left corner of the browser window...
Let's make the text area larger... What about enlarging to: rows=20 and cols=40?
Finally, by invoking 'Ctrl+V', we will past the entire text to the newly created field.
Everything was completed, only let us print the text again, this time in PyCharm...

--------------------
(...)
--------------------

Well, I need to leave, for a coffee break...
See you around!
Cheers!

( press any key to quit... )


Sur cette page du site, vous pouvez voir la vidéo en ligne Mimic Ctrl+A, Ctrl+C, Ctrl+V with Selenium, Python and JavaScript. durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur www.beeyond.xYz 13 septembre 2017, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 2,092 fois et il a aimé 4 téléspectateurs. Bon visionnage!