seleniumbase / SeleniumBase

📊 Python's all-in-one framework for web crawling, scraping, testing, and reporting. Supports pytest. UC Mode provides stealth. Includes many tools.
https://seleniumbase.io
MIT License
4.45k stars 908 forks source link

Recorder and placeholder value #2848

Closed kitsune0n closed 3 weeks ago

kitsune0n commented 3 weeks ago

When I Make Record, recorded action with Placeholder Self.type ('Input [Placeholder = "0.00005 ~ 0.000858"]', "0.003") but value "0.00005 ~ 0.000858" can be random on all playbacks(value changes when reload page) Is the any method for Solving this?

mdmintz commented 3 weeks ago

I would need to see the outer html of that input element in order to make any improvements to the Recorder.

kitsune0n commented 3 weeks ago

I would need to see the outer html of that input element in order to make any improvements to the Recorder.

<input data-v-102aee8a="" type="text" maxlength="18" placeholder="0.00005~0.004575" class="right" style="min-width: 50px;">

I can provide a link to the resource if external links are allowed here

mdmintz commented 3 weeks ago

That input element didn't have any unique attributes, so the Recorder did the best that it could, and it picked the placeholder="0.00005~0.004575" one. For these special cases, you may need to replace the selector it chose with a better one manually. Perhaps if there's only one input element on that page, you can just use input. If there are more, you'll have to pick a better selector.