首页 > 解决方案 > 如何使用 if 子句来确保它检查问题中的“知识”词?

问题描述

我一直在尝试解决/练习以下练习(Selenium Webdriver with Python),因为我是编程新手。

练习总结:

Open http://www.wikipedia.org and write NUnit/WebDriver test for the following using
Google Chrome: (12 points)
a. Display on console the number of articles in English and click on “English” link (3 points)
b. Search for Anna University. (3 points)
c. Print the 'Motto in English' part in the console and ensure it has the word 'Knowledge' in
it. (3 points)
d. Ensure that “Shiv Nadar” is listed in notable people section (3 points)

--> 现在在这里我无法写下如何放置 if 语句来检查/确保其中包含单词 Knowledge 以及如何检查 d 部分?

请帮助我理解。

标签: pythonpycharm

解决方案


推荐阅读