Answer the question
In order to leave comments, you need to log in
Xpath syntax: strings, numbers, variables, functions?
Gentlemen, there are clickable buttons on the website of the form: xpath("//button[contains(text(),'+5')]"), the numbers can be different. Is it possible to use a variable instead, or convert the string '+5' to a number in order to click() on the desired button, for example if >= +20?
ps
I will put a question on another.
Algorithm of actions:
1. Open the page
2. Click the button with a certain condition, for example >= 10
3. The list opens on the same page
4. Click the button with a certain condition, for example >= 1
5. Close the list by clicking the same button from the item 2
6. We click another button with the same condition from point 2, performing the actions of points 3, 4, 5.
So we do, for example, 10 times.
Explain schematically the algorithm of a python program. Understood with xpath.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question