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: timeouts, element displayed boolean fn, linear mouse movements, HTTP packet listener #227

Open
KJHJason opened this issue Jul 25, 2024 · 0 comments

Comments

@KJHJason
Copy link

A few weeks back before trying chromiumoxide, I have used a Python library, g1879/DrissionPage.

However, while developing with chromiumoxide, I did find some features lacking like timeouts when compared to that Python library.

  • Timeouts
    • While locating elements, specify a timeout like input_el: ChromiumElement = page.ele("tag:input", timeout=2.5) in DrissionPage
  • Element displayed boolean function with timeout
    • Specify a locator and check if the element is found within the specified duration. Otherwise, return false.
    • Reference: ele_exists: bool = page.wait.ele_displayed(r"xpath://a[@href='/']", timeout=1.5) in DrissionPage
  • Moving the mouse linearly instead of instantly within a specified duration
    • Requires calculating the x and y coordinate points to move the mouse in the specified duration.
    • The main challenge would be obtaining the current x and y coordinates of the mouse for the calculations. In my implementation, I just made a wrapper struct to store the mouse's current x and y coordinates after moving the mouse.
  • HTTP/HTTPS packet listener
    • Specify what to capture like GET responses or specific response types like HTML documents.
    • Allow developers to inspect the returned HTTP/HTTPS packet in the Chrome browser like the status code, etc.

Yes, I know I should just use that Python library, but it would be great to see some of these features implemented in Chromiumoxide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant