Skip to content
This repository was archived by the owner on May 30, 2023. It is now read-only.

Added "phantom.simulateMouseClick" and other minors for debugging. #10

Merged
merged 1 commit into from
Apr 10, 2011
Merged

Added "phantom.simulateMouseClick" and other minors for debugging. #10

merged 1 commit into from
Apr 10, 2011

Conversation

detro
Copy link
Collaborator

@detro detro commented Mar 1, 2011

Hi Ariya,

this adds support for "phantom.simulateMouseClick": it's implemented using the code that was there for "uploading input file". I also sorteed that out, putting everything into a simple macro.

It uses a query selector to do the trick, so it can click multiple things, if the selector matches more than one dom element.

Hope you find it useful.
Ivan

* 'phantom.simulateMouseClick' accepts a 'selector' and clicks on every element that matches the selector
* Added a couple of 'qDebug()' to help debugging PhantomJS
@ariya
Copy link
Owner

ariya commented Mar 1, 2011

I prefer to get this functionality (or something similar) after issue 41 is solved. Let's keep this open.

@detro
Copy link
Collaborator Author

detro commented Mar 1, 2011

OK, but what exactly is the connection there?
This just addresses the problem of generating "clicks" programmatically.
Why you think this is related with the "Security issues" described in #41?

@ariya
Copy link
Owner

ariya commented Mar 1, 2011

It falls under the same ideal restriction: "any scripts running in the page should not be able to access certain phantom functions".

Giving it a second thought, I think this one should be safe since it's just a convenient function.

Also we should be able to group features like this once we have module support (issue 32).

@detro
Copy link
Collaborator Author

detro commented Mar 1, 2011

I see.

Still, while you (we?) find a solution to the sandboxing problem, this feat. might come handy.

@ariya ariya merged commit 8951859 into ariya:master Apr 10, 2011
ariya pushed a commit that referenced this pull request Oct 5, 2011
lfranchi pushed a commit to lfranchi/phantomjs that referenced this pull request Oct 25, 2011
@ariya ariya mentioned this pull request Mar 15, 2013
@andronick83 andronick83 mentioned this pull request Mar 15, 2013
This was referenced Jul 1, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants