File tree Expand file tree Collapse file tree 6 files changed +48
-7
lines changed Expand file tree Collapse file tree 6 files changed +48
-7
lines changed Original file line number Diff line number Diff line change 1+ """An example of clicking at custom CAPTCHA coordinates."""
2+ from seleniumbase import SB
3+
4+ with SB (uc = True , test = True , locale = "en" ) as sb :
5+ url = "https://www.indeed.com/"
6+ sb .activate_cdp_mode (url )
7+ sb .sleep (1 )
8+ sb .click ('[data-gnav-element-name="SignIn"] a' )
9+ sb .uc_gui_click_captcha ()
10+ sb .type ('input[type="email"]' , "test@test.com" )
11+ sb .sleep (1 )
12+ sb .click ('button[type="submit"]' )
13+ sb .sleep (3.5 )
14+ selector = 'div[class*="pass-Captcha"]'
15+ element_rect = sb .cdp .get_gui_element_rect (selector , timeout = 1 )
16+ x = element_rect ["x" ] + 32
17+ y = element_rect ["y" ] + 44
18+ sb .cdp .gui_click_x_y (x , y )
19+ sb .sleep (4.5 )
Original file line number Diff line number Diff line change 1+ """SB() without the context manager `with` block."""
2+ from seleniumbase import SB
3+
4+ sb_context = SB ()
5+ sb = sb_context .__enter__ ()
6+ sb .open ("data:text/html,<h1>Test Page</h1>" )
7+ sb .highlight ("h1" , loops = 8 )
8+ sb_context .__exit__ (None , None , None )
9+
10+ """Same example using `with`:
11+ from seleniumbase import SB
12+
13+ with SB() as sb:
14+ sb.open("data:text/html,<h1>Test Page</h1>")
15+ sb.highlight("h1", loops=8)
16+ """
Original file line number Diff line number Diff line change @@ -66,8 +66,9 @@ pytest-xdist==3.6.1;python_version<"3.9"
6666pytest-xdist == 3.8.0 ;python_version >= "3.9"
6767parameterized == 0.9.0
6868behave == 1.2.6
69- soupsieve == 2.7
70- beautifulsoup4 >= 4.13.5 ,< 4.14
69+ soupsieve == 2.7 ;python_version < "3.9"
70+ soupsieve ~= 2.8 ;python_version >= "3.9"
71+ beautifulsoup4 ~= 4.13.5
7172pyotp == 2.9.0
7273python-xlib == 0.33 ;platform_system == "Linux"
7374markdown-it-py == 3.0.0 ;python_version < "3.10"
Original file line number Diff line number Diff line change 11# seleniumbase package
2- __version__ = "4.41.2 "
2+ __version__ = "4.41.3 "
Original file line number Diff line number Diff line change @@ -3137,7 +3137,9 @@ def get_driver(
31373137 proxy_string , proxy_scheme = proxy_helper .validate_proxy_string (
31383138 proxy_string , keep_scheme = True
31393139 )
3140- if proxy_string and proxy_user and proxy_pass :
3140+ if proxy_user and not proxy_pass :
3141+ proxy_pass = ""
3142+ if proxy_string and proxy_user :
31413143 proxy_auth = True
31423144 elif proxy_pac_url :
31433145 username_and_password = None
@@ -3164,7 +3166,9 @@ def get_driver(
31643166 )
31653167 if not proxy_pac_url .lower ().endswith (".pac" ):
31663168 raise Exception ('The proxy PAC URL must end with ".pac"!' )
3167- if proxy_pac_url and proxy_user and proxy_pass :
3169+ if proxy_user and not proxy_pass :
3170+ proxy_pass = ""
3171+ if proxy_pac_url and proxy_user :
31683172 proxy_auth = True
31693173 if (
31703174 is_using_uc (undetectable , browser_name )
Original file line number Diff line number Diff line change 214214 'pytest-xdist==3.8.0;python_version>="3.9"' ,
215215 'parameterized==0.9.0' ,
216216 "behave==1.2.6" , # Newer ones had issues
217- 'soupsieve==2.7' ,
218- "beautifulsoup4>=4.13.5,<4.14" ,
217+ 'soupsieve==2.7;python_version<"3.9"' ,
218+ 'soupsieve~=2.8;python_version>="3.9"' ,
219+ "beautifulsoup4~=4.13.5" ,
219220 'pyotp==2.9.0' ,
220221 'python-xlib==0.33;platform_system=="Linux"' ,
221222 'markdown-it-py==3.0.0;python_version<"3.10"' ,
You can’t perform that action at this time.
0 commit comments