Forum Discussion
Solved
coffee
Contributor
No, it doesn't have unique id. Need to find the parent and go down to its grandchild.
baxatob
8 years agoCommunity Hero
- coffee8 years agoContributor
Hi baxatob ,
That one is dynamically created , so not static.
Also I have other cases where there is completely no ID.
I tried that code in Chrome and it works perfectly fine, so Javascript-syntax-wise should be all right. Not sure why TC doesn't like it.
Thank You.
- baxatob8 years agoCommunity Hero
Try to iterate using:
...querySelector(CSS_selector).children.item(index). ... .textContent
- coffee8 years agoContributor
Thank you very much baxatob
The solution does work. :smileyhappy:
I am just wondering why TC use different method than native Javascript.
Is there any article/documentation about children.item(i)? Just want to dig further about this method and how TC explore the DOM. I assume there are other methods that TC uses differently than the native Javascript? Thanks.
Related Content
- 4 years agoSuperTester
- 4 years agoSuperTester
Recent Discussions
- 17 hours agojstaehlin
- 2 days agoAivanitskiy