I'm trying to get the text inside of my value
div with id staked
(397.497836). It looks like this:
I'm coping the xpath of the element, which is: //*[@id="staked"]
In all of the examples i've seen on stackoverflow/github it seems that people are able to retrieve the text using textContent
however my logging doesn't show that field available.
await page.waitForXPath('//*[@id="staked"]');
let handle = await page.$x('//*[@id="staked"]');
console.log(handle[0]);
_remoteObject: {
type: 'object',
subtype: 'node',
className: 'HTMLDivElement',
description: 'div#staked.value',
objectId: '-6241729959890640645.3.7'
},
For context, this isn't static text, as i'm passing it from my React component. Any ideas how I could do this differently to obtain the text?