Error reporting: Selenium project can run locally, and there is no graphical use case execution error on Jenkins deployed in CentOS virtual machine: element click intercepted
Troubleshooting ① first check whether the browser and driver versions match
Browser driver download address: http://chromedriver.storage.googleapis.com/index.html
Troubleshooting ② check whether there are chrome processes that have not been closed. If there are, you need to kill them in batches
kill -9 $(pgrep chrome)
Troubleshooting ③ if the driver version matches, report and correct the error. Add the following code, with the focus on adding window size
chrome_options = Options()
chrome_options.add_argument('--headless') # To open the browser, comment out the line of code
chrome_options.add_argument('--disable-gpu')
chrome_options.add_argument("--window-size=1920,1080") # Error reported when adapting jenkins build{"error":"element not interactable"}
chrome_options.add_argument("--no-sandbox")
chrome_options.add_argument('--disable-dev-shm-usage')
driver = webdriver.Chrome(chrome_options=chrome_options)
Build successful
Read More:
- How to Solve Error: Element ‘dependency’ cannot have character [children], because the type’s content type is element-
- Win10 Right-Click desktop to Display Setting Error [How to Solve]
- [Solved] Click the play button to display: e/mediaplayer: error (1, – 2147483648)
- Nacos Click service offline error: caused: errCode: 500, errmsg: do metadata operation failed;
- Redis cannot double-click redis-server.exe to start normally
- [Solved] element-plus Error: Failed to resolve component
- [How to Solve] Content with element type ‘mapper’ must match
- [Solved] RuntimeError: each element in list of batch should be of equal size
- [Solved] Vue3 Eslint Error: The template root requires exactly one element
- [Solved] SpringMVC Error: element web-app must be declared
- [How to Solve Vue warn]: Unknown custom element: did you register the component correctly?
- How to Solve Error: Cannot find the declaration of element ‘beans’.
- Unknown custom element: [xxx] – did you register the component correctly…
- Element table Error: ‘tableId‘ of undefined“ [How to Solve]
- [Solved] ORA-21525: attribute number or (collection element at index) string violated its constraints
- How to Fix “initializer element is not constant” error
- Element Error when await is used in UI form submission [Solved]
- How to Solve Error: “initializer element is not constant”
- Vue Error compiling template: Component template should contain exactly one root element. If you
- [Solved] Manifest merger failed: android:exported needs to be explicitly specified for element <activity#com