1

I am trying to write an automation tool for a browser game that takes some data from the web page, in this case the data appears to be added using JS after the page has loaded, I assume this is where my issue is.

I'm trying to grab the text that the JS adds and save it to a variable, but when I try and find it using the WebBrowser component's DOM controls, it cannot find the text I need. The text IS there, you can see it on the browser window and the source should easily be found as I can see it when using Chrome's dev console/inspect element tool, when I target it using the DOM controls, VS makes it clear that it can't find it. I am 100% certain I was targeting it right and that I'm not pointing it in the wrong direction.

Is there a way for the WebBrowser to refresh/re-read the source without refreshing the page? Otherwise, how would you go about working around this?

Cheers, Tom.

4

1 回答 1

0

从某物提取文本时想到的一种解决方法是使用 MS Office 文档成像。如果文本总是出现在页面上的特定位置,那应该只是获取文本出现位置的打印屏幕,然后将其运行到 OCR 的问题。这样做的好处是它非常面向未来,游戏制作可以改变他们显示文本的方法,但只要它显示你应该能够打印屏幕它。:)

于 2013-07-15T13:47:32.970 回答