For Advanced

Lesson 1/10

Vital Selenium

Now, since you know the basics, it’s time to leverage some important and unique features of G1ANT.Language. Let’s try the commands that master the Internet — starting with the ones, which communicate with browsers.

The command is used to click an element on a webpage that was open using the command. Both commands are provided by the Selenium Addon, so in order to use them, you need to enable the addon in the Addons panel to the left of the script editor: just click the check box next to the selenium entry to select it.

Run this script: chrome url
window ✱Google✱ style maximize search gb_70 by id

You can see your Chrome browser launched and the Google search page opens (the command in the first line), then the browser window is maximized (the window command). Finally, the Google Account login page is displayed, because the command clicks the Sign In button in the top right corner of the page.

But wait, what does the search gb_70 by id mean? It’s an “address” of an element (the Sign In button in this particular case) in a webpage’s source code. In the next lesson you will learn how you can get it.