aahnik / wappdriver

Wondering how to send WhatsApp messages using Python using only 3 lines of code? You have come to the right place!
https://aahnik.github.io/wappdriver/
MIT License
46 stars 3 forks source link

After putting the name of person in search box we should not send enter, rather click on correct person #10

Closed aahnik closed 4 years ago

aahnik commented 4 years ago

Person to be identified by setting @ title = name

Solve This to solve issue #6

aahnik commented 4 years ago

implemented , see v 0.1.2 or above

aahnik commented 4 years ago
# we will send the name to the input key box
        search_box.send_keys(name)

        try:
            person = WebDriverWait(self.driver, self.timeout).until(expCond.presence_of_element_located(
                (By.XPATH, f'//*[@title="{name}"]')))
            person.click()
            return True

not dynamically updating path as it is rare to change (hope so as generic) and high security matter.. messing up could lead to problem