ST - Selenium - Assignment - Xpath
Selenium - Assignment - Xpath
Use the following page and Webpage:
https://www.google.com/
Exercise 1: Find the title element on the page.
Exercise 2: Find all the input elements on the page.
Exercise 3: Find the link to Gmail on the page.
Exercise 4: Find all the links that are contained within
a div element.
Exercise 5: Find all the elements that are not links.
Exercise 6: Find all the elements with a class of
"gb".
Exercise 7: Find all the elements with an ID that ends
with "fset".
Exercise 8: Find all the elements that are children of
the div with the ID "gbwa".
Exercise 9: Find all the elements that are siblings of
the div with the ID "gbwa".
Exercise 10: Find all the elements that are descendants
of the body element.
Exercise 11: Find all the elements that have a style
attribute.
Exercise 12: Find all the elements with a class of
"gb" that are also links.
Exercise 13: Find all the elements that have an ID
attribute.
Exercise 14: Find all the elements with a name attribute.
Exercise 15: Find all the elements that have an attribute
with a value containing the word "Google".
Exercise 16: Find all the elements that are not
descendants of the div with the ID "gbwa".
Exercise 17: Find all the elements with a class of
"gb" that are not links.
Exercise 18: Find all the elements that have an attribute
with a value that starts with "https".
Exercise 19: Find all the elements that have an attribute
with a value that ends with ".png".
Exercise 20: Find all the elements that have an attribute
with a value that contains the word "logo".
Exercise 21: Find all the elements that have an attribute
with a value that is a valid email address.
Exercise 22: Find all the elements that have a
"role" attribute.
Exercise 23: Find all the elements that have a
"tabindex" attribute.
Exercise 24: Find all the elements that have a
"type" attribute with a value of "submit".
Exercise 25: Find all the elements that have a
"value" attribute with a value of "I'm Feeling Lucky".
Exercise 26: Find all the sibling elements of the search
box.
Exercise 27: Find all the child elements of the search
box.
Exercise 28: Find all the parent elements of the search
box.
Exercise 29: Find all the descendant elements of the
first button on the page.
Exercise 30: Find all the ancestor elements of the Google
logo image.
Exercise 31: Find all the following sibling elements of
the "Google Search" button.
Exercise 32: Find all the preceding sibling elements of
the "Google Search" button.
Exercise 33: Find all the ancestor elements of the search
box that are div elements.
Exercise 34: Find all the child elements of the "I'm
Feeling Lucky" button that are span elements.
Exercise 35: Find all the descendant elements of the div
with the ID "gb" that are links.
Exercise 36: Find all the parent elements of the link to
Gmail that are div elements.
Exercise 337: Find all the following sibling elements of
the div with the ID "gb" that are links.
Exercise 38: Find all the preceding sibling elements of
the div with the ID "gb" that are links.
Exercise 39: Find all the ancestor elements of the
"Google Search" button that are div elements and have a class of
"sbl1".
Exercise 40: Find all the descendant elements of the body
element that have a class of "gb" and are links.
Exercise 41: Find all the child elements of the div with
the ID "hplogo" that are image elements.
Exercise 42: Find all the following sibling elements of
the "I'm Feeling Lucky" button that are input elements.
Exercise 43: Find all the parent elements of the link to
"Images" that are div elements and have a class of "gb".
Exercise 44: Find all the ancestor elements of the div
with the ID "gbq1" that are body elements.
Exercise 45: Find all the preceding sibling elements of
the div with the ID "gbwa" that are div elements and have a class of
"gb".
Comments
Post a Comment