Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating the XPATH on find_by_username method #57

Merged
merged 1 commit into from
Jun 4, 2022

Conversation

euriconicacio
Copy link
Collaborator

As per issue #56, when trying to send a simple message, the execution hang forever and nothing happened. While debugging, it was noticed that the XPATH for the search_box on find_by_username was not correct, probably due to an app update.

So, currently, this is incorrect:

            search_box = self.wait.until(
                EC.presence_of_element_located(
                    (By.XPATH, '//*[@id="side"]/div[1]/div/label/div/div[2]')
                )
            )

And this is correct:

            search_box = self.wait.until(
                EC.presence_of_element_located(
                    (By.XPATH, '//*[@id="app"]/div[1]/div[1]/div[3]/div[1]/div[1]/div[1]/div[1]/div[2]/div[1]/div[2]')
                )
            )

In addition, seizing the PR, it is delivered a method for closing the browser after sending a message - it is advised, though, to drop a sleep after sending an image/video and before calling the method to close the browser, otherwise the message content will not be delivered correctly.

Since unit testing is not the procedure adopted on this repo, this code works perfectly with the up-mentioned change in the XPATH.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants