I'm currently writing a UI test for creating a new message in my app, I ran into an issue with asserting that the message is actually created. The assertion I want to make contain two stages, First, counting the current amount of messages in the page(all the messages got the same CLASS_NAME) before the new message is created. Second, count the amount of messages after the new message has been created and expect a +1 difference in the count. I'm stuck on the first stage.
Example HTML Document
<div data-v-33228p9f="" data-v-44788nw1="" class="status-card status-card-rejected">
<div data-v-34524d1n="" class="card-header">
<div data-v-7895hewq="" class="card-title">
<div data-v-rs39lmno="" class="card-title-text">
<div data-v-3w9f8wsa="" data-v-3746955y="" class="tooltip" tooltip="message header" position="top">
Python Selenium implementation
currentAmountOfMessages = len((driver.find_elements(By.CLASS_NAME, 'card-title')))
print('current amount of messages is:')
print (currentAmountOfMessages)
The outcome received is
current amount of messages is:
0
Because I received the value 0 - I wondered maybe the code is correct but the class_name isn't but I've tried all the class names which belong to the messages in my app and none of them worked.