I have a board where days of the week are the column and people's name are the rows, So I can use two parameters to find the cell of an employee for a certain day: data-user-id='30646
and data-shift-date='2016-10-15'
I have tried to do that in Python:
driver.find_element_by_xpath( "//div[@data-user-id='30646']" and "//div[@data-shift-date='2016-10-15']").click()
But If I do that, it only respects the last condition and so it will select the first cell on the 15th October 2016.
Do you have any ideas to find an element by using two class's attributes?
This is the HTML part for the cell I want to click on:
<div class="table-cell show-plus no-events" ng-class="{'show-plus': ctrl.shouldShowPlus(user, group, day), 'no-events': !_events.length, 'is-today': day === ctrl.todayString}" ng-repeat="day in ctrl.currentDays" ng-click="ctrl.addShift(user, day, false, group.grouping, group.isExchange, group.key)" lvl-drop-target="true" on-drop="ctrl.dropped(dragEl, dropEl, event, 'week')" data-user-id="30646" data-is-exchange="false" data-shift-date="2016-10-15" id="a9125bcc-ab64-e112-a5d1-ff33ade19968"><!----></div>
I can't use id="a9125bcc-ab64-e112-a5d1-ff33ade19968"
, it is dynamic and changes all the time when I load my browser.