driver
is a Selenium WebDriver, which of the following enables us to find all the table elements within a web page? driver.find_elements("tag name", "table")
driver.find_elements("tag name", "td")
driver.find_elements("name", "table")
driver.find_elements("name", "td")
element
is a Selenium WebElement given by <a href="page.html" target="_blank">link<\a>
. Which of the following returns link
? element.text
element.get_attribute("text")
element.get_attribute("href")
element.href
text
stores a reference to a WebElement object instance which can accept input
. Which of the following will enable us to send 1
as the input? text.send_keys("1")
text.send_keys(1)
text.send_key("1")
text.send_key(1)
<div id="a">
<ul>
<li>1</li>
<li>2</li>
</ul>
</div>
<div id="b">
<ul>
<li>3</li>
<li>4</li>
<li>5</li>
</ul>
</div>
Assuming driver
is correctly initialized, what does the following code snippet print? element = driver.find_element("id", "a")
elements = element.find_elements("tag name", "li")
print(len(elements))
2 element
is an HTML table WebElement with 3 rows and 3 columns, which of the following code finds the text in the last cell of the first row in the table? element.find_element("tag name", "tr").find_elements("tag name", "td")[2].text
element.find_elements("tag name", "tr")[2].find_element("tag name", "td").text
element.find_element("tag name", "td").find_elements("tag name", "tr")[2].text
element.find_elements("tag name", "tr")[2].find_element("tag name", "td").text
element
is an HTML text input WebElement, which one of the following clears the text in element
? element.clear()
element.text = ""
element.send_key("")
element.send_keys("")
{node: "A", g: 1, h: 10}
, {node: "B", g: 3, h: 7}
, {node: "C", g: 5, h: 3}
, {node: "D", g: 7, h: 2}
, where "g" represents the distance from the initial node and "h" represents the heuristic (estimated distance to the goal node). Which node will best first greedy search check next? {node: "A", g: 1, h: 10}
, {node: "B", g: 3, h: 7}
, {node: "C", g: 5, h: 3}
, {node: "D", g: 7, h: 2}
, where "g" represents the distance from the initial node and "h" represents the heuristic (estimated distance to the goal node). Which node will A search check next? Last Updated: November 18, 2024 at 11:43 PM