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.

amazon.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.

amazon.get_page_title()
Returns

{“pagetitle”:”amazon”}

Return type

dict

Get Page Source

It returns the pagesource of page opened.

amazon.get_page_source()
Returns

{“pagesource”:”pagesource”}

Return type

dict

Get Current Url

It returns the pagesource of page opened.

amazon.get_current_url()
Returns

{“url”:”url”}

Return type

dict

Reload

It reloads the page opened.

amazon.reload()
Returns

{}

Return type

dict

Keypress

It perform the keypress passed.

amazon.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.

amazon.scroll()
Returns

{}

Return type

dict

End

It ends the amazon session and close the automated chromedriver.

Note

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

amazon.end()
Returns

{}

Return type

dict

Quit

It quits the datakund application runing in background.

Note

You will need to import datakund library again to start datakund application.

amazon.quit()
Returns

{}

Return type

dict