Sign in to follow this  
Followers 0
Kairu

Firefox Automation Using FF.au3

5 posts in this topic

Using this thread and script to automate firefox, I have the basic idea down on what to do. I can get automation going within regular websites, click links, send text, log in. The basics. But I am having trouble with the apps on myspace.

It seems most of the things sent through are as javascript, which to my understanding cannot effect something within a frame when it is from a different domain.

Does anyone know of a way around this, or something that could be used instead? I have tried some different things, but they all had to do with the Javascript. And I am not sure on any way I can turn off the security which is preventing cross domain javascript.

Any help would be greatly appreciated.

~Kairu

Share this post


Link to post
Share on other sites



What do you mean "sent through as javascript". That makes no sense. Do you mean iFrames? Look at the source code of the page you're working with. I don't use myspace, so I am not sure


Regards,Josh

Share this post


Link to post
Share on other sites

The most things in FireFox are only XUL and Javascript, so the main functions from the FF.au3, too.

This functions are running inside of FireFox and they are not dependent to the current side.

How do you have tried to access the frames?

Share this post


Link to post
Share on other sites

MozDev recieves commands as strings, and in FF.au3 the majority (All which I have looked through) are executed in javascript. Such a mouse clicks and keyboard commands.

Basically, I have tried the only real way possible (There are other variations but I cant think of them all)

[nameOfFrame].document.content.find("REFRESH")

Or things like content.frames[1].document.find("REFRESH")

But it was suggested on another forum that the reason it is not working is because of the secutiry in Firefox, which does not allow javascript in one domain to execute functions on another domin, within a frame. If that makes sense.

Basically, if you run it and both the main website and the frames website have the same domain "myspace.com" it will work, but since they are hosted on different domains, the main being myspace.com and the frames contents being on msappspace.com firefox will not let the functions to be run.

Share this post


Link to post
Share on other sites

Yes that's true. That's not working because of the security in FF3.

But you can use all commands in the FF.au3, because the uses an additional object like the normal Javascripts.

If you want to use an object FF3 you must use the following:

content.wrappedJSObject.document....

then it works without the security alerts.

But for work with frames you can use the commands _FFFrameEnter, _FFFrameLeave, _FFFrameSeleceted ...

FF.au3 documentation

Frame Example

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0