OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Problem with selecting a specific web element with Playwright in Python

  • Thread starter Thread starter Renato C.Francisco
  • Start date Start date
R

Renato C.Francisco

Guest
I'm having problems using the selector to specify a HTML input.

I want Playwright to identify a WhatsApp TEXTBOX so that I can use it, but there is no ID, or even a CSS element that I can specify.

At first, I tried using the command detailed on DOC, getting the elements from the website.

Code:
<div title="Search text box" role="textbox" class="_13NKt copyable-text selectable-text" contenteditable="true" data-tab="3" dir="ltr"></div>

But I can't specify the search TEXTBOX to fill, with the example:

Code:
element.fill("contact name")

I don't know if this is a syntax problem. Is there another way to specify this element?
<p>I'm having problems using the selector to specify a HTML input.</p>
<p>I want Playwright to identify a WhatsApp <strong>TEXTBOX</strong> so that I can use it, but there is no ID, or even a CSS element that I can specify.</p>
<p>At first, I tried using the command detailed on <a href="https://playwright.bootcss.com/docs/selectors" rel="nofollow noreferrer">DOC</a>, getting the elements from the website.</p>
<pre><code><div title="Search text box" role="textbox" class="_13NKt copyable-text selectable-text" contenteditable="true" data-tab="3" dir="ltr"></div>
</code></pre>
<p>But I can't specify the search <strong>TEXTBOX</strong> to fill, with the example:</p>
<pre><code>element.fill("contact name")
</code></pre>
<p>I don't know if this is a syntax problem. Is there another way to specify this element?</p>
Continue reading...
 

Latest posts

B
Replies
0
Views
1
Blundering Ecologist
B
Top