Selenium

All

Intro

It’s so interesting how much stuff it’s possible to be done just using some python script and libs.

I was doing some small stuff with Selenium here and it’s very useful actually, just play around with automating web browsing stuff.

This site brings a neat tutorial on this case

Selenium

    Webdriver

It is this API to make the navigation easy:

 WebDriver driver = new FirefoxDriver();

So then you can use, as Colin did, find_element_by_id directly, like javascript.

browser.find_element_by_id('search_form_input_homepage')

    Bottom click

next_button = [e for e in browser.find_elements_by_class_name('item-page')
                   if e.text.lower().find('next') > -1]
>>> next_button.click()

REFs

  Colin’s tutorial

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s