Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Autotest in Firefox (geckodriver)

  • No replies
  • 1 has this problem
  • 26 views
more options

Hello. I'm a tester and just starting to write autotests. I use python, selenium.

The case is simple - you need to open the page and click on the button for a pop-up with fields for registration to appear. Here's the whole test function: def auth_user(self):

   wd = self.wd
   wd.delete_all_cookies()
   try:
       close_town_pop_up = wd.find_element_by_css_selector('#app > div.overlay-wrapper > div > button').click()  #закрываем поп-ап с городами
   except ex.NoSuchElementException:
       pass
   time.sleep(1)
   try:
       auth_button = wd.find_element_by_css_selector('.SideToolbarContainer > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1)').click()   #нажимаем на кнопку входа
   except ex.ElementNotInteractableException or ex.NoSuchElementException:
        auth_button = wd.find_element_by_css_selector('#app > div.body__header > header > div > div.LowerPanelsContainer > '
                                                     'div > div.LowerPanelItem.LowerPanelItem--login > div > div > a > span.HeaderButtonIcon > svg').click()  #нажимаем на кнопку входа при адаптивной вёрстке
   time.sleep(2)
   input_phone = wd.find_element_by_css_selector('input#authorizer-input-username') #ищем элемент, чтобы кликнуть
   input_phone.send_keys('***********')   #передаём номер телефона в поле
   input_password = wd.find_element_by_css_selector('input#authorizer-input-password') #ищем элемент, чтобы кликнуть
   input_password.send_keys('****') #передаём пароль в поле
   time.sleep(2)
   press_auth_button = wd.find_element_by_class_name('AuthorizerForm__submit').click() # нажимаем на кнопку авторизации
   time.sleep(9)


When I run the test in chrome, opera - the test passes, the user is authorized.

When executing the test in FF (version 89.0.1 (64-bit)) - problem with the login button (auth_button). At first I thought I needed some kind of delay - added webdriverwait. After it didn't work - thought the button locator was not located. I started katalon with the recorder and also tried selenium IDE for FF - the locator was located, the login button itself is highlighted, but not clicked. After that, I already started looking at what was happening in the called browser. It seems that the browser is launched with JS turned off - no any pop-ups are opened. No errors or JS messages are dropped into the console. I go into the settings of the called browser - there is no need to disable the JS checkbox. The elements for the HeaderButton do not have an event, but when the browser is normally launched, the event is labeled on the HeaderButton element. Use geskodriver v.0.29.1 Please help me understand what is wrong in the FF browser caused by autotests?

You must log in to your account to reply to posts. Please start a new question, if you do not have an account yet.