Closed revshell0 closed 3 years ago
Issue-Label Bot is automatically applying the label bug
to this issue, with a confidence of 0.93. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!
Links: app homepage, dashboard and code for this bot.
Hey can you check if this is happening in previous versions of webbot ?
On Thu, Jul 30, 2020, 11:42 PM issue-label-bot[bot] < notifications@github.com> wrote:
Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.93. Please mark this comment with 👍 or 👎 to give our bot feedback!
Links: app homepage https://github.com/marketplace/issue-label-bot, dashboard https://mlbot.net/data/nateshmbhat/webbot and code https://github.com/hamelsmu/MLapp for this bot.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nateshmbhat/webbot/issues/42#issuecomment-666574531, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFRTSNQNGWHN3VRF2ONPMNTR6GZ2PANCNFSM4POKTSTQ .
Can you check if this is happening in previous versions of webbot?
You can use the driver object directly.
web.driver.find_element_by_id()
There are methods on the driver object to find element by ID, css and XPath.
@nateshmbhat What I had originally written was not a bug. That's the intended behaviour. I misunderstood it.
The exists() method expects a text as an argument and that text is actually the name of the element itself and NOT the value present within the element.
Meaning, driver.exists('username', id='username')
checks whether 'username' is infact the name of the element with 'username' id. That's how you check whether an element exists or not.
Cheers!
@nateshmbhat The exists() method with any constructor inside it, always returns True despite entering random values.
You can try this code snippet. It always returns True.
Could you please check and fix this bug? My QA code makes extensive use of 'exists()' method. It will be very helpful. Thanks.