Show elements in element

12 views
Skip to first unread message

Maximilian K

unread,
May 7, 2019, 7:39:26 PM5/7/19
to nodejs
How can I write a code in selenium similar to this one in jQuery?

$(".row").each(function(){
$(this).find("[itemprop='name']").each(function(idx,val){console.log($(val).text())});
$(this).find("[itemprop='streetAddress']").each(function(idx,val){console.log($(val).text())});
$(this).find("[itemprop='postalCode']").each(function(idx,val){console.log($(val).text())});
$(this).find("[itemprop='addressLocality']").each(function(idx,val){console.log($(val).text())});
$(this).find("[itemprop='telephone']").each(function(idx,val){console.log($(val).text())});
$(this).find("[itemprop='faxNumber']").each(function(idx,val){console.log($(val).text())});
$(this).find("[itemprop='email']").each(function(idx,val){console.log($(val).text())});
$(this).find("[itemprop='url']").each(function(idx,val){console.log($(val).text())});
console.log("[NEW ELEMENT]");
});
Reply all
Reply to author
Forward
0 new messages