Find page elements and navigation

.. to a link: driver.get("link_url")

.. interacting with the page, find elements: 

1. find one:  find_element_by_xx.....

2. find more: find_elements_by_xx...

            use:  for element_name in all_elements_found: 

                            print("Value is: %s", element_name.get_attribute("value"))

             to output the values.

.. driver.switch_to_fram("iframe_name")

..drag_and_drop:    from selenium.webdriver import ActionChains

                                action_chains = ActionChains(driver)

                                 action_chains.drag_and_drop(element, target).perform()

.. driver.switch_to_window("window_name")

.. driver.switch_to_frame("frameName.0.childName"):

                                         would go to the frame named “childName” of the first subframe of the frame called “frameName”. All frames are evaluated as if from *top*.

.. Back to the parent frame:  driver.switch_to_default_content()

3. Frequently used methods

你可能感兴趣的:(Find page elements and navigation)