Okay, so I have a web page with simple tables repeating:
<table>
<tr>
<td class="foo1">
<a href="/foo.php" class="bar1">ARGUMENT</a><br>
<img src="foo.jpg" alt="foo"><br>
REPLACE_1
</td>
<td class="foo1">
REPLACE_2
</td>
</tr>
<table>
Now how to replace "TEXT_1" and "TEXT_2" if "ARGUMENT" is whatever
string? In pseudocode that would look like:
foreach(var table in page.GetElements(table))
foreach(var tr in table.GetElements(tr)) {
var td = tr.GetElements(td);
if(td[0].Class == "foo1") {
var firstLink = td[0].GetElements(href);
if(firstLink[0].Name == "ARGUMENT") {
//replacing TEXT_2
td[1].Value = "TEXT_2 replaced!";
//still, how to replace TEXT_1?
}
}
}
Sorry, your wiki is really unclear. :(
--
You received this message because you are subscribed to the Google Groups
"greasemonkey-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/greasemonkey-users?hl=en.