in retrospective I now understand why Zen Master... you certantly need lots of patience to deal guys like me. I really appreciate the support...
I guess I am getting close, my code now looks like:
void Window::examineChildElements(const QWebElement &parentElement,
{
QWebElement element = parentElement.firstChild();
while (!element.isNull()) {
item->setText(0, element.tagName());
parentItem->addChild(item);
if (element.tagName()== "TEXTAREA")
{
QWebElement textArea;
element.appendInside(textArea);
textArea.evaluateJavaScript("this.value = \"some new value for text area\"");
}
examineChildElements(element, item);
element = element.nextSibling();
}
}
void Window::examineChildElements(const QWebElement &parentElement,
QTreeWidgetItem *parentItem)
{
QWebElement element = parentElement.firstChild();
while (!element.isNull()) {
QTreeWidgetItem *item = new QTreeWidgetItem();
item->setText(0, element.tagName());
parentItem->addChild(item);
if (element.tagName()== "TEXTAREA")
{
QWebElement textArea;
element.appendInside(textArea);
textArea.evaluateJavaScript("this.value = \"some new value for text area\"");
}
examineChildElements(element, item);
element = element.nextSibling();
}
}
To copy to clipboard, switch view to plain text mode
I does complie, but no text is added to the search box....
Help is always welcome...
-CgS
Bookmarks