Other Functions

You can use basic functions which selenium provides with this library like opening a url, get pagesource, get current url etc. These are the functions:-

Open

It will open the url provided in the argument.

google.open(url)
Parameters

url (str) – Link which need to be opened

Returns

{}

Return type

dict

Get Page Title

It returns the title of page opened.

google.get_page_title()
Returns

{“pagetitle”:”google”}

Return type

dict

Get Page Source

It returns the pagesource of page opened.

google.get_page_source()
Returns

{“pagesource”:”pagesource”}

Return type

dict

Get Current Url

It returns the pagesource of page opened.

google.get_current_url()
Returns

{“url”:”url”}

Return type

dict

Reload

It reloads the page opened.

google.reload()
Returns

{}

Return type

dict

Keypress

It perform the keypress passed.

google.keypress(key)
Parameters

key (str) – Key which need to be pressed, e.g pagedown,arrowleft,enter

Returns

{}

Return type

dict

Scroll

It scrolls to the end of page.

google.scroll()
Returns

{}

Return type

dict

End

It ends the google session and close the automated chromedriver.

Note

You will need to create google object again after end().

google.end()
Returns

{}

Return type

dict

Quit

It quits the bot-studio application runing in background.

Note

You will need to import bot-studio library again to start application.

google.quit()
Returns

{}

Return type

dict