Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] support moving elements #192

Open
boludoz opened this issue Mar 21, 2024 · 17 comments
Open

[Feature request] support moving elements #192

boludoz opened this issue Mar 21, 2024 · 17 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@boludoz
Copy link
Contributor

boludoz commented Mar 21, 2024

The clicking system is great, but sometimes it is not correct when there is movement, the button cannot be pressed and it causes a silent error. For example when an image is loading.

@boludoz boludoz changed the title [Bug] There are some difficulties in clicking. [Bug] Some difficulties in clicking. Mar 21, 2024
@kaliiiiiiiiii
Copy link
Owner

@boludoz Please provide more information such as

  • movement of what?
  • what's the silent error?
  • Code to test with (POC)

@kaliiiiiiiiii kaliiiiiiiiii added the needs information more information needed label Mar 21, 2024
@kaliiiiiiiiii kaliiiiiiiiii changed the title [Bug] Some difficulties in clicking. [Bug] Button click fails Mar 21, 2024
@boludoz
Copy link
Contributor Author

boludoz commented Mar 21, 2024

For example, suppose we disable the loading wait in 'self.get' and use the element wait timeout, which is very useful.

If the website does not finish loading and an image appears that moves a button downwards in a cascading manner, this will cause a click failure, and it is more common than it seems.

Then the code will continue and wait until the next find_element, there the 'silent error' will occur. In the original selenium this will produce a click intercepted exception or something like that.

@kaliiiiiiiiii
Copy link
Owner

You mean support moving elements ?

@boludoz
Copy link
Contributor Author

boludoz commented Mar 21, 2024

Yes, I think it's more of a "small bug", if an element is not loaded on time it will fail, using javascript to click that doesn't happen but I understand the concept of undetectability which is very effective, maybe create a function for personal use so that it uses moveto but ends the movement with jsclick.

@kaliiiiiiiiii kaliiiiiiiiii changed the title [Bug] Button click fails [Feature request] moving elements Mar 21, 2024
@kaliiiiiiiiii kaliiiiiiiiii changed the title [Feature request] moving elements [Feature request] support moving elements Mar 21, 2024
@kaliiiiiiiiii kaliiiiiiiiii added enhancement New feature or request help wanted Extra attention is needed and removed needs information more information needed labels Mar 21, 2024
@boludoz
Copy link
Contributor Author

boludoz commented Mar 22, 2024

Maybe you can make the click location check and the click be in the same previous call

@kaliiiiiiiiii
Copy link
Owner

Maybe you can make the click location check and the click be in the same previous call

Nope, click unfortunately has to be in one call. Only thing possible similarly like that is pausing the debugger. Tho thet ofc is detectable.

@boludoz
Copy link
Contributor Author

boludoz commented Mar 23, 2024

Maybe a pre-check.

@boludoz
Copy link
Contributor Author

boludoz commented Mar 23, 2024

Perhaps a pre-check of the element as a human would do, pausing the page when clicking.

@boludoz
Copy link
Contributor Author

boludoz commented Mar 28, 2024

Can you explain to me how you did this to access an iframe with CDP?

@kaliiiiiiiiii
Copy link
Owner

Can you explain to me how you did this to access an iframe with CDP?

business secret 🤫😂
Nah it's in the code ofc but - to much to explain for me:/

@boludoz
Copy link
Contributor Author

boludoz commented Apr 13, 2024

Perhaps you can pause the execution of the website for a moment.

@kaliiiiiiiiii
Copy link
Owner

Perhaps you can pause the execution of the website for a moment.

yeah but that would be detectable

@boludoz
Copy link
Contributor Author

boludoz commented Apr 13, 2024

Perhaps you can pause the execution of the website for a moment.

yeah but that would be detectable

Can't you cut off the internet and disable the cache just before clicking? I think there is a command to do this.

@kaliiiiiiiiii
Copy link
Owner

Perhaps you can pause the execution of the website for a moment.

yeah but that would be detectable

Can't you cut off the internet and disable the cache just before clicking? I think there is a command to do this.

uh well but the script could save the current time in a variable, even obfuscated etc. just really not feasible.
Or detect timing lags over a websocket at server side.

This will have to get implemented by some propper algorithm which takes into account moving elements & generates a mouse path accordingly in real-time.

atm don't have the time nor enough calculus & stats. knowledge to develop that kind of stuff.

@boludoz
Copy link
Contributor Author

boludoz commented Apr 13, 2024

Perhaps you can pause the execution of the website for a moment.

yeah but that would be detectable

Can't you cut off the internet and disable the cache just before clicking? I think there is a command to do this.

uh well but the script could save the current time in a variable, even obfuscated etc. just really not feasible. Or detect timing lags over a websocket at server side.

This will have to get implemented by some propper algorithm which takes into account moving elements & generates a mouse path accordingly in real-time.

atm don't have the time nor enough calculus & stats. knowledge to develop that kind of stuff.

It is not a moving element, but a simple web page that has not yet finished loading its images and there is a button right below it.

@kaliiiiiiiiii
Copy link
Owner

It is not a moving element, but a simple web page that has not yet finished loading its images and there is a button right below it.

Well but it's still the issue that the element location changes - right?
Soo therefore still same approach

@boludoz
Copy link
Contributor Author

boludoz commented Apr 17, 2024

It's true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants