<META> tag is a special HTML tag that provides information about a Web page. Metadata will not be displayed on the page, but will be machine parsable.
Unlike normal HTML tags, meta tags do not affect how the page is displayed. Instead, they provide information such as,
- who created the page(author),
- how often it is updated,
- what the page is about(page description), and
- which keywords represent the page's content.
Many search engines use this information when building their indices. This is how it looks:
<head>
<meta name="description" content="Free Web tutorials">
<meta name="keywords" content="HTML,CSS,XML,JavaScript">
<meta name="author" content="Ståle Refsnes">
<meta charset="UTF-8">
</head>
Note: <meta> tag always goes inside the <head> element.
Store & Assert <meta> tag 'Description' content:
2. Insert the xpath //meta[@name='description']@content in Target field.
3. Now store the value and print it.
storeAttribute | //meta[@name='description']@content | variable
echo | ${variable}
Java code for store and assert <meta> tag description contents:
String variable= driver.findElement(By.xpath("//meta[@name='description']")).getAttribute("content");
System.out.println(variable);
assertEquals("your text", variable);
Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging.
ReplyDeleteBig Data Hadoop training in electronic city
Python Training in electronic city
DataScience with Python Training in electronic city
AWS Training in electronic city
Big Data Hadoop Training in electronic city
Devops Training in electronic city
blockchain Training in electronic city
Hibernate Training in electronic city
Data science Training in Electronic City
Selenium with python Training in Electronic City
Nice Blog Thank you for sharing..
ReplyDeleteReally nice and interesting.DataScience with Python Training in Bangalore
Nicee blog thanks for posting
ReplyDelete