@@ -586,9 +586,10 @@ namespace :py do
586586 sh "python3 -m twine upload bazel-bin/py/selenium-#{ python_version } .tar.gz"
587587 end
588588
589- desc 'Update generated Python files for local development'
590- task :update do
589+ desc 'generate and copy files required for local development'
590+ task :local_dev do
591591 Bazel . execute ( 'build' , [ ] , '//py:selenium' )
592+ Rake ::Task [ 'grid' ] . invoke
592593
593594 FileUtils . rm_rf ( 'py/selenium/webdriver/common/devtools/' )
594595 FileUtils . cp_r ( 'bazel-bin/py/selenium/webdriver/.' , 'py/selenium/webdriver' , remove_destination : true )
@@ -674,22 +675,28 @@ namespace :py do
674675 sh 'tox -c py/tox.ini -e linting'
675676 end
676677
677- namespace :test do
678- desc 'Python unit tests'
679- task :unit do
678+ namespace :test do
679+ desc 'Python unit tests'
680+ task :unit do
681+ Rake ::Task [ 'py:clean' ] . invoke
682+ Bazel . execute ( 'test' , [ '--test_size_filters=small' ] , '//py/...' )
683+ end
684+
685+ %i[ chrome edge firefox safari ] . each do |browser |
686+ desc "Python #{ browser } tests"
687+ task browser do
680688 Rake ::Task [ 'py:clean' ] . invoke
681- Bazel . execute ( 'test' , [ '--test_size_filters=small' ] , '//py/...' )
689+ Bazel . execute ( 'test' , [ ] , "//py:common-#{ browser } " )
690+ Bazel . execute ( 'test' , [ ] , "//py:test-#{ browser } " )
682691 end
692+ end
683693
684- %i[ chrome edge firefox safari ] . each do |browser |
685- desc "Python #{ browser } tests"
686- task browser do
687- Rake ::Task [ 'py:clean' ] . invoke
688- Bazel . execute ( 'test' , [ ] , "//py:common-#{ browser } " )
689- Bazel . execute ( 'test' , [ ] , "//py:test-#{ browser } " )
690- end
691- end
694+ desc "Python Remote tests with Firefox"
695+ task :remote do
696+ Rake ::Task [ 'py:clean' ] . invoke
697+ Bazel . execute ( 'test' , [ ] , "//py:test-remote" )
692698 end
699+ end
693700end
694701
695702def ruby_version
@@ -706,7 +713,7 @@ namespace :rb do
706713 end
707714
708715 desc 'Update generated Ruby files for local development'
709- task :update do
716+ task :local_dev do
710717 Bazel . execute ( 'build' , [ ] , '@bundle//:bundle' )
711718 Rake ::Task [ 'rb:build' ] . invoke
712719 Rake ::Task [ 'grid' ] . invoke
0 commit comments