-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Category selection sometimes fails #2
Comments
I think the problem comes from the category name and not from the visibility of the category on the page. There was a piece of code that removed the spaces in the category name (so the script could never find them on the page with the xpath because the space was missing). I fixed that and still added the scroll to the category before clicking on it. [Don't forget to star the repo if you liked it :) ] |
I had no issues with the category names on my side. The script just sometimes worked, and sometimes would fail. I see two ways of solving this issue:
If I find some time I'll try to do that on my side. If I manage to pull it off, I'll make a pull request. [Edit: I starred your repo :)] |
I refactored the code based on the second solution you suggested (very good solution in my opinion). However I don't wait until all categories are loaded because I didn't find a good way to do that. Now when the script is launched we are asked how many instances to launch (chromium instances). Then we are asked what we want to generate (we can indicate several elements by separating them with commas). We can also indicate that we want to create several iterations of an element by adding a # with the desired number (example: chicken#5 ). Then we are asked which styles to use (we can indicate several styles by separating them with commas). I tried to generate 15 elements with 2 different styles on 10 instances and everything worked correctly. Could you please try and give me a feedback to see if it fixes the problem you had. Thanks in advance But I still have to modify the documentation accordingly. |
@fpinchon did you have time to test the new version of the script? |
The category selection sometimes fails because the category is not scrolled on the screen. Manually scrolling the categories until the one it's trying to click on is visible solves the issue. It would be nice if the script itself tried to scroll until the category it wants is on screen. Can this be done with selenium?
(Also I have to mention that everything else works perfectly, thank you so much for this!)
The text was updated successfully, but these errors were encountered: