MCQs > IT & Programming > Selenium Automation > how would you select only the element with the 2 classes: ‘container' and 'title’?

Selenium Automation MCQs

Consider the following HTML:
<div class="container‘">
(div class="title" >
</div> </div>
(div class="container‘ title")
</div>
Using Selenium WebDriver. how would you select only the element with the 2 classes: ‘container' and 'title’? Select all the correct answers.

Answer

Correct Answer:

By.xpath("div[contains(@class. 'container title')");.By.xpath(“//div[contains(@class. 'container') and
contains(@class. 'title‘)]");.

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Selenium Automation Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Selenium Automation Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it