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"
66
66
pytest-xdist == 3.8.0 ;python_version >= "3.9"
67
67
parameterized == 0.9.0
68
68
behave == 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
71
72
pyotp == 2.9.0
72
73
python-xlib == 0.33 ;platform_system == "Linux"
73
74
markdown-it-py == 3.0.0 ;python_version < "3.10"
Original file line number Diff line number Diff line change 1
1
# 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(
3137
3137
proxy_string , proxy_scheme = proxy_helper .validate_proxy_string (
3138
3138
proxy_string , keep_scheme = True
3139
3139
)
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 :
3141
3143
proxy_auth = True
3142
3144
elif proxy_pac_url :
3143
3145
username_and_password = None
@@ -3164,7 +3166,9 @@ def get_driver(
3164
3166
)
3165
3167
if not proxy_pac_url .lower ().endswith (".pac" ):
3166
3168
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 :
3168
3172
proxy_auth = True
3169
3173
if (
3170
3174
is_using_uc (undetectable , browser_name )
Original file line number Diff line number Diff line change 214
214
'pytest-xdist==3.8.0;python_version>="3.9"' ,
215
215
'parameterized==0.9.0' ,
216
216
"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" ,
219
220
'pyotp==2.9.0' ,
220
221
'python-xlib==0.33;platform_system=="Linux"' ,
221
222
'markdown-it-py==3.0.0;python_version<"3.10"' ,
You can’t perform that action at this time.
0 commit comments