Good day. The problem is this: made the auto test python + selenium. On the local computer it works, on the server it starts up with hands, it does not work through jenkins. the test is that it uploads the site, logs in, takes several actions, goes to one of the tabs, and searches through the list for items using the xpath code. on the computer, on the server it finds. through jenkins, everything hangs on the site login-password screen, but does not give an error anywhere except when finding the elements (screwed up the screenshot-maker). between the login password and the search for an element, the program takes several other actions and gives no error, although at every action (again on the screenshots) the same login-password screen.

  • Could you attach a jenkins log? And maybe not enough expectations? try something like this: wait.until(EC.element_to_be_clickable((By.ID, "pass_id"))) driver.find_element_by_id('login').send_keys('login') - blindeStern
  • the log will not help. The program crashes on assert by xpath, which searches for elements on the page. work everywhere except jenkins. It looks very much like Jenkins "Frisite" kind of page when first loaded, the rest processes are working, but outwardly it looks like a page with a login and password. I have several asserts to the buggy, through which it passes. - dory fish
  • Maybe add driver.maximize_window() ? The point may be that the test simply does not see the desired elements of the page? Jenlins in general where is deployed locally or on the server somewhere? What is the OS? - blindeStern
  • Added and custom resolution and maximum. on server. windows server 2012r s018.radikal.ru/i526/1710/c3/3f5493027d73.png s48.radikal.ru/i119/1710/db/79bd6c0e5605.png - dory fish
  • Does Jenkins service have access to desktop operations? On the wiki, Jenkins found: If you’re a slave, you’ll have to do it. I had a similar problem with non-clickability of elements. Jenkins simply did not see them / or they were "blocked" by other elements. In the end, everything was decided exactly as I described above. - blindeStern

1 answer 1

Everything was decided more simply: jenkins was launched as an application, and not as a service, and it began to perform tests visually. but there is a problem that it does not run tests, if not located on the server.