At first I go to the website www.google.de. I want to retrieve the word Deutschland from this HTML-Code:
<div class="logo-subtext">Deutschland</div>
I have to use xpath, because id in this div class is not available.
Here you will see the HTML-source code -->
view-source:https://www.google.de/?gws_rd=ssl
- How to load the HTML of the website into a robot variable?
- How to find the div-Element and get the text out of it?
Code-Snippet of my Robot-File until now:
*** Settings ***
Library Selenium2Library
*** Test Cases ***
xpath-test
Open Browser https://www.google.de/ browser=firefox
${elem} = Get WebElement xpath=//div[text()="Deutschland"]
//div[@class = 'logo-subtext']returns the correct element, but someone else has to explain how to do this in the robot framework. - Mathias Müller