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

Adds get_attribute and get_cookies method #39

Merged
merged 6 commits into from
Jun 4, 2023

Conversation

tomasserravento
Copy link
Contributor

This can be used to get attributes such as class, aria-label, aria-valuenow, etc.

I have been using caqui and for now it works perfectly. I needed to get the attribute of an element but I couldnt find a method to do so, so here it is. I have tested it and it works fine.

Thanks for the work here!

This can be used to get attributes such as class, aria-label, aria-valuenow, etc.
@tomasserravento tomasserravento changed the title Adds get_attribute method Adds get_attribute async method Jun 4, 2023
@tomasserravento tomasserravento changed the title Adds get_attribute async method Adds get_attribute method Jun 4, 2023
@tomasserravento tomasserravento changed the title Adds get_attribute method Adds get_attribute and get_cookies method Jun 4, 2023
@douglasdcm
Copy link
Owner

Thanks a lot @tomasserravento for this contribution. Can you add the unit tests for all functions, please? I'm trying to keep a high code coverage. There are many examples for synchronous and asynchronous functions. If you have any issue, please let me know

@tomasserravento
Copy link
Contributor Author

Hey, just added the unit tests @douglasdcm . I hope they are okay!

============================================================================= test session starts ==============================================================================
platform win32 -- Python 3.10.6, pytest-7.3.1, pluggy-1.0.0
rootdir: D:\GitHub\caqui
plugins: asyncio-0.21.0
asyncio: mode=strict
collected 54 items

tests\test_sniffer.py ssssss                                                                                                                                              [ 11%] 
tests\feature\test_sync_and_async.py ...........                                                                                                                          [ 31%]
tests\integration\test_async_scenarios.py .                                                                                                                               [ 33%]
tests\integration\test_sync_scenarios.py .                                                                                                                                [ 35%]
tests\unit\test_async_unit.py ................                                                                                                                            [ 64%]
tests\unit\test_helper.py ....                                                                                                                                            [ 72%] 
tests\unit\test_sync_unit.py ...............                                                                                                                              [100%]

======================================================================== 48 passed, 6 skipped in 7.86s ========================================================================= 

@douglasdcm douglasdcm merged commit 4143530 into douglasdcm:main Jun 4, 2023
1 check passed
@tomasserravento tomasserravento deleted the patch-1 branch June 4, 2023 20:39
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.

None yet

2 participants