From the course: Robot Framework Test Automation: Level 2

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

HTML attributes

HTML attributes

- [Instructor] Let's have a quick look at attributes. There are some official attributes like id, title, name, href and so on. All that means is that we're going to go into something like the div tag here and I'll add a space and I'll start typing i, and you can see that I get a dropdown here of potential attributes. And when I double click on id it gives me the syntax for what an attribute should look like. And this attribute value can really be anything. Again, it should be lowercase and I use hyphens to separate multiple words. So my id for this will just be called a-cool-div. So the fact that I've added an id to my div doesn't do anything in the rendering. When I go and open this up, you can see that I don't see anything in here about my cool div but if I right click on this and I inspect the element. You can see that down here in the HTML markup I can see the presence of that id. And we can use that id attribute very effectively as a locator and we'll see more about that in a few…

Contents