Accessing content window - Multiprocess Firefox

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

Accessing content window - Multiprocess Firefox

by COSMOS on Wed Aug 10, 2016 12:06 am

Hey guys,

I am currently using IMacros V11.1.495.5175, Firefox 48, Windows 7 German.
I am writing the code in js and calling iMacros from there.
I just ran into an issue and I don't know if it's going to be a problem in the future.

I have this line:
final_macro += "ADD !EXTRACT " + '"' + lager_col2[0].textContent + '"' + "\n";

When I ran my js in the browser I got this error:
Error: Accessing content window is not supported in multiprocess Firefox, line 208 (Error code: -991)

Should I be worried ? Is the use of textContent forbidden ?
The problem is that "lager_col2[0]" sometimes happen to be a link and I only want the text inside the link, not the tags and everything. So naturally I went with textContent.
How could I get around this ?´

Additionally, am I setting myself up for trouble when trying to access certain nodes with the use of window.document.getElementsByClassName ?
I feel like everyone is going to advise me against it but it was easier than using the traditional TAG POS/XPATH/etc

Thank you !
COSMOS
 
Posts: 19
Joined: Wed Jul 27, 2016 10:11 pm

Re: Accessing content window - Multiprocess Firefox

by Tom, Tech Support on Fri Aug 12, 2016 8:05 am

Hi COSMOS,

COSMOS wrote:Additionally, am I setting myself up for trouble when trying to access certain nodes with the use of window.document.getElementsByClassName ?
I feel like everyone is going to advise me against it but it was easier than using the traditional TAG POS/XPATH/etc
Due to architecture constraints with the new multiprocess Firefox, it is no longer possible to access the DOM from a .js running in iMacros for Firefox 9.0.3 (nor from iMacros 8.9.7 when Multiprocess Windows is enabled.) See the release announcement for more information.
Regards,

Tom, iMacros Support
Tom, Tech Support
 
Posts: 3298
Joined: Mon May 31, 2010 9:59 am

Re: Accessing content window - Multiprocess Firefox

by COSMOS on Thu Aug 18, 2016 12:39 am

From what I read on the firefox documentation, there is a solution for using DOM in js.
You could access the content using window.messageManager.content or something like that.
I'm sure it's something relatively easy but I didn't struggle with the documentation too much because I didn't have time for it.
I removed all the window.document lines and reworked my code to do the same thing.
It's not pretty but it works and I'm sure it's safer this way too.

Thanks again for the help !
COSMOS
 
Posts: 19
Joined: Wed Jul 27, 2016 10:11 pm

Re: Accessing content window - Multiprocess Firefox

by Tom, Tech Support on Thu Aug 18, 2016 3:24 am

Thanks for the feedback COSMOS!

From what our development has told me:
DOM access - not gonna happen. The whole idea of e10s is to make web-pages live in a dedicated, sandboxed process. Providing asynchronous access to some DOM methods is more or less a possibility, but providing synchronous access again the way it used to be is something... huge, I'm afraid that kind of project would eclipse everything else time-wise.
Regards,

Tom, iMacros Support
Tom, Tech Support
 
Posts: 3298
Joined: Mon May 31, 2010 9:59 am


Return to Data Extraction and Web Screen Scraping

Who is online

Users browsing this forum: Google [Bot] and 6 guests

-->