File tree Expand file tree Collapse file tree 3 files changed +48
-0
lines changed 
lib/selenium/webdriver/common 
spec/integration/selenium/webdriver Expand file tree Collapse file tree 3 files changed +48
-0
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,8 @@ def set_capabilities
7171      def  initialize ( **opts ) 
7272        self . class . set_capabilities 
7373
74+         opts [ :web_socket_url ]  =  opts . delete ( :bidi )  if  opts . key? ( :bidi ) 
75+ 
7476        @options  =  opts 
7577        @options [ :browser_name ]  =  self . class ::BROWSER 
7678      end 
Original file line number Diff line number Diff line change @@ -61,6 +61,20 @@ module Chrome
6161
6262          driver . quit 
6363        end 
64+ 
65+         it  'enables BiDi on initialization'  do 
66+           quit_driver 
67+ 
68+           options  =  Selenium ::WebDriver ::Options . chrome ( bidi : true ) 
69+           expect ( options . web_socket_url ) . to  be  true 
70+           expect ( options . bidi? ) . to  be  true 
71+ 
72+           driver  =  Selenium ::WebDriver . for  :chrome ,  options : options 
73+ 
74+           expect ( driver . capabilities . web_socket_url ) . to  be_a  String 
75+ 
76+           driver . quit 
77+         end 
6478      end 
6579    end  # Chrome 
6680  end  # WebDriver 
Original file line number Diff line number Diff line change @@ -43,6 +43,38 @@ module Edge
4343            expect ( ua ) . to  eq ( 'foo;bar' ) 
4444          end 
4545        end 
46+ 
47+         it  'enables bidi'  do 
48+           quit_driver 
49+ 
50+           options  =  Selenium ::WebDriver ::Options . chrome 
51+           expect ( options . web_socket_url ) . to  be_nil 
52+           expect ( options . bidi? ) . to  be  false 
53+ 
54+           options . enable_bidi! 
55+           expect ( options . web_socket_url ) . to  be  true 
56+           expect ( options . bidi? ) . to  be  true 
57+ 
58+           driver  =  Selenium ::WebDriver . for  :chrome ,  options : options 
59+ 
60+           expect ( driver . capabilities . web_socket_url ) . to  be_a  String 
61+ 
62+           driver . quit 
63+         end 
64+ 
65+         it  'enables BiDi on initialization'  do 
66+           quit_driver 
67+ 
68+           options  =  Selenium ::WebDriver ::Options . chrome ( bidi : true ) 
69+           expect ( options . web_socket_url ) . to  be  true 
70+           expect ( options . bidi? ) . to  be  true 
71+ 
72+           driver  =  Selenium ::WebDriver . for  :chrome ,  options : options 
73+ 
74+           expect ( driver . capabilities . web_socket_url ) . to  be_a  String 
75+ 
76+           driver . quit 
77+         end 
4678      end 
4779    end  # Edge 
4880  end  # WebDriver 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments