[Python] find a button by cssselector

html 如下:

<div class="admin-welcome-hero">
       <h1>Welcome to the Meeting System</h1>
       <div class="admin-intro">
          Click on a current or previous meeting to edit or review details, or create a new meeting.
       </div>
       <button class="btn btn-lg new-meeting" ng-click="vm.newmeeting(this);"> 
         Create a new meeting 
       </button> 
</div>

The css selector you are looking for is:

By.CssSelector("button.new-meeting")

if you want to be more specific you can do

By.CssSelector("div.admin-welcome-hero button.new-meeting")

相關文章

寫留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *