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

Update element.py: box_model, size, location, rect, get_attribute, is_displayed, is_enabled, is_selected, is_clickable #13

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

boludoz
Copy link

@boludoz boludoz commented Sep 5, 2024

Example:

  • box_model: BoxModel(content=Quad([202, 679.234375, 710, 679.234375, 710, 700.703125, 202, 700.703125]), padding=Quad([189, 669.234375, 723, 669.234375, 723, 710.703125, 189, 710.703125]), border=Quad([188, 668.234375, 724, 668.234375, 724, 711.703125, 188, 711.703125]), margin=Quad([188, 668.234375, 724, 668.234375, 724, 711.703125, 188, 711.703125]), width=536, height=43, shape_outside=None)
  • size {'height': 43, 'width': 536}
  • location: {'x': 202, 'y': 679.234375}
  • rect: {'top_left': {'x': 202, 'y': 679.234375}, 'bottom_right': {'x': 710, 'y': 700.703125}, 'width': 536, 'height': 43}
  • get_attribute: gameUserId3
  • is_displayed: True
  • is_enabled: True
  • is_selected: False
  • is_clickable: True

Example:
- box_model: 
 BoxModel(content=Quad([202, 679.234375, 710, 679.234375, 710, 700.703125, 202, 700.703125]), padding=Quad([189, 669.234375, 723, 669.234375, 723, 710.703125, 189, 710.703125]), border=Quad([188, 668.234375, 724, 668.234375, 724, 711.703125, 188, 711.703125]), margin=Quad([188, 668.234375, 724, 668.234375, 724, 711.703125, 188, 711.703125]), width=536, height=43, shape_outside=None)
size {'height': 43, 'width': 536}
location {'x': 202, 'y': 679.234375}
rect {'top_left': {'x': 202, 'y': 679.234375}, 'bottom_right': {'x': 710, 'y': 700.703125}, 'width': 536, 'height': 43}
- get_attribute:
 gameUserId3
- is_displayed:
 True
- is_enabled:
 True
- is_selected:
 None
- is_clickable:
 True
@boludoz boludoz changed the title Update element.py: box_model, Update element.py: box_model, location, rect, get_attribute, is_displayed, is_enabled, is_selected, is_clickable Sep 5, 2024
@boludoz boludoz changed the title Update element.py: box_model, location, rect, get_attribute, is_displayed, is_enabled, is_selected, is_clickable Update element.py: box_model, size, location, rect, get_attribute, is_displayed, is_enabled, is_selected, is_clickable Sep 5, 2024
@boludoz
Copy link
Author

boludoz commented Sep 5, 2024

@ultrafunkamsterdam Please add these features, they are useful. 🙏🥺

@boludoz
Copy link
Author

boludoz commented Sep 5, 2024

In the future I plan to add find_visible and find_selected, find_clickable if you allow me along with other homonymous functions.

nodriver/core/element.py Outdated Show resolved Hide resolved
nodriver/core/element.py Outdated Show resolved Hide resolved
nodriver/core/element.py Outdated Show resolved Hide resolved
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

Successfully merging this pull request may close these issues.

2 participants