How to click a span with given text using Selenium Python

0 votes

I need to click ALL_USA, you can see in the code below. I need to click a row in a table but unable to do so. My HTML code is below:

<div id="table" arid="1" arwindowid="0" style="height: 299px; width: 638px;">

 <div class="TableHdr" style="visibility: hidden; display: none; width: 638px;">

  <div class="TableInner" style="top: 0px; height: 277px; width: 638px;">

   <div class="BaseTableOuter" draghandler="BaseTable_DragHandler" style="height: 275px; width: 636px;">

    <div class="BaseTableColHeaders" style="width: 636px; left: 0px;">

     <div class="BaseTableInner" style="top: 16px; height: 259px; width: 636px;  overflow-y: auto; overflow-x: hidden;">

      <table id="T1" class="BaseTable" title="" style="width: 2px;">

   <colgroup cols="1">

  <tbody>

        <tr class="hiddentablehdr">

        <tr class="" tabindex="0" arrow="0">

        <tr tabindex="0" arrow="1">

        <tr tabindex="0" arrow="2">

        <tr tabindex="0" arrow="3">

        <tr class="SelPrimary" tabindex="0" arrow="4">

        <td class="BaseTableCellOdd BaseTableCellOddColor BaseTableStaticText" "scope="row" style="width: 636px;">

          <nobr class="dp " style="text-align: left; width: 636px;">

             <span style="padding: 1px 4px;float:left;">ALL_USA</span>

         </nobr>

     </td>

  </tr>

 <tr tabindex="0" arrow="5">