Final Flashcards
Change tracking systems like GitHub Issues track all changes to a product-both bugs and enhancement requests.
True
The reason for using a change tracking system like GitHub Issues is that it:
- encourages decisions regarding specific changes
- allows project management to understand how complete or incomplete the project is
- ensures that proposed changes are not lost
All HTML elements must have a name, id, or class.
False
What does the following snippet print?
url_ddg = “https://api.duckduckgo.com”
resp = requests.get(url_ddg + “/?=presidents%20of%20the%20united%20states&format=json”
rsp_data = resp.json()
print(rsp_data[“Heading”])
prints the one and only value of the “Heading” dictionary item returned by the website, assuming that such an item exists
Using relative XPath is preferred over absolute XPath.
True
In pytest-bdd, scenario outlines can usually be replaced by pytest parametrization.
True
In Selenium tests, what type of wait should one use if there is an element that might load slowly, such as an image?
Explicit
Every element on a page might have a unique locator, but it is not required.
True
Why are Web elements and locators separate concerns?
- Page structure could change at any time due to dynamic content
- Referencing every element directly from root-to-child becomes unwieldy for large pages
- Elements might disappear from a page due to code changes or even bugs
HTML class attributes are unique within a document.
False
What are the commands or actions supported by python’s requests REST API?
get - retrieves information from a server
post - can create a subordinate resource
put - can replace a resource at a known URL
delete - removes a resource
In a Selenium test, how do find_element and find_elements differ?
- If multiple applicable elements exist, find_element returns only the first
- If no applicable elements are found, find_elements returns an empty list
- If no applicable element is found, find_element throws an exception
In Selenium tests, an element may exist before it appears.
True
HTML name attribute is unique within a document.
False
Which of the following CSS selectors would select only “div” elements with the class name “parent”?
div.parent