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

Показать описание
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...
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... )
--------------- 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...
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... )
Комментарии