Reputation: 5
I want to typetext on textarea with parent class that marked on this following img Snippet code I want to use that class because id on textarea is dynamic element and will change every loaded. That's why I use parent class. I use
let textArea = Selector('.block-card list-group-item text-card col-xs-12').find('textarea')
await t
.typeText(textArea, 'Hai...')
But got error:
The specified selector does not match any element in the DOM tree.
> | Selector('.block-card list-group-item text-card col-xs-12')
| .find('textarea')
Here's the UI UI. Anyone can help me?
Upvotes: 0
Views: 519
Reputation: 446
I would use an Xpath. something like : //div[@class="block-card list-group-item text-card col-xs-12"]//textarea
Upvotes: 1
Reputation: 567
This might work
let textArea = Selector('.hwt-container').find('textarea').withAttribute('class','text-card-text')
Upvotes: 2