I’m having trouble with my Selenium tests for a mobile eCommerce site. The site uses Bootstrap and runs on SAP. We’re testing it on BrowserStack.
The weird thing is, my tests keep failing at different spots each time. I get errors like Element not clickable
or Element not found
. It’s driving me crazy!
I’ve tried using fluent waits up to 50 seconds, but no luck. I know Bootstrap is async and Selenium is sync, which can cause issues. But I thought the waits would fix that.
We’re using Selenium 4.16 and JDK 21. The site uses Bootstrap 3.4.0.
Has anyone else run into this? Any ideas on how to make the tests more stable? I’m out of ideas and could really use some help!
Hey Sky_Dreamer, mobile testing can be such a pain, right?
I’m curious, have you tried playing around with different mobile devices or OS versions on BrowserStack? Sometimes I’ve found that certain device/OS combos can be extra finicky with Bootstrap.
Also, this might sound a bit out there, but have you considered using a visual regression testing tool? I recently started using one (can’t remember the name, ugh) and it’s been a game-changer for catching those sneaky UI glitches that Selenium misses.
Oh, and random thought - are you using any custom JavaScript on your site? I once had a similar issue and it turned out some of our custom JS was conflicting with Bootstrap’s async loading.
Keep us posted on what you find out! I’m super interested to hear if you crack this mystery. Maybe we can all learn something new from your experience!
sounds like a tricky issue! have u tried using explicit waits? sometimes they outdo fluent waits for me. also, check if dynamically loaded content is causing hiccups. increasing viewport size may help. good luck!
I’ve encountered similar issues with Selenium and Bootstrap. One approach that’s worked for me is implementing a custom wait condition that checks for both element presence and interactability. This can help with those pesky ‘not clickable’ errors.
Another thing to consider is network conditions. BrowserStack allows you to simulate different network speeds. Try running your tests with a slower connection to see if that exposes any race conditions.
Lastly, have you looked into using a visual testing tool alongside Selenium? Something like Applitools can be a game-changer for catching visual regressions that might be causing your tests to fail inconsistently.
Hope this helps. Mobile testing can be a real headache sometimes!