Bot Continues to Next Block After Login Failure

shThs

Пользователь
Регистрация
03.10.2018
Сообщения
117
Благодарностей
3
Баллы
18
Hi,

I am working with a bot that simply logins into a website by taking login info from a list and pasting it into the sign-in fields of the website login phase. The problem that I am having is that even if the credentials are incorrect or bad, the webpage reloads the login page and asks the user to try again, but the bot continues to move on to the next block.

I would like to understand how to prevent the bot from moving on to the next block if it fails the login process and have the Bad Code record that. This would be a good way for me to know if accounts from my list is bad. But since the bot continues to the end and reports it as successful, I then get misleading information about the status of the account that was pulled from the list.

Any help would be appreciated.
 

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 868
Благодарностей
1 195
Баллы
113
Hi,

I am working with a bot that simply logins into a website by taking login info from a list and pasting it into the sign-in fields of the website login phase. The problem that I am having is that even if the credentials are incorrect or bad, the webpage reloads the login page and asks the user to try again, but the bot continues to move on to the next block.

I would like to understand how to prevent the bot from moving on to the next block if it fails the login process and have the Bad Code record that. This would be a good way for me to know if accounts from my list is bad. But since the bot continues to the end and reports it as successful, I then get misleading information about the status of the account that was pulled from the list.

Any help would be appreciated.
Login page asks the user to try again. --- Then you have to make logical action to check that message.
Many ways how to do that.
 

shThs

Пользователь
Регистрация
03.10.2018
Сообщения
117
Благодарностей
3
Баллы
18
I am using a Bad Code logic to return account to a list if the bot fails. But I am not sure what logic I can use for it to do the same with the message.

I located the message and found it's attribute and value, but I am not sure how to define it in an "IF" switch for example.
 

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 868
Благодарностей
1 195
Баллы
113
I am using a Bad Code logic to return account to a list if the bot fails. But I am not sure what logic I can use for it to do the same with the message.

I located the message and found it's attribute and value, but I am not sure how to define it in an "IF" switch for example.
1. There are action Check for text presence
2. I would use a much simpler way.

Just make one action after log in where bot should Click let's say user profile button what is available only after you are logged in.
So if bot will not be able to find that profile button means its not logged in means it will give error on that action means it will go to bad end
 

shThs

Пользователь
Регистрация
03.10.2018
Сообщения
117
Благодарностей
3
Баллы
18
Sorry, I see several post that suggest to use , Check for text presence, but I can't find where it is in Project Maker.
 

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 868
Благодарностей
1 195
Баллы
113
Sorry, I see several post that suggest to use , Check for text presence, but I can't find where it is in Project Maker.
Highlight any text you want to check.
Right click - Check Text presence - works not always you will have to dig deeper because not all texts on the page are as texts.

UPD: Should cover basic
 

shThs

Пользователь
Регистрация
03.10.2018
Сообщения
117
Благодарностей
3
Баллы
18
Got it the idea behind your last point.

I was able to create a Check for text presence, and it automatically created an IF switch and puts it to a new variable.

My concern is that I already have a Bad End code, and the software will not allow for more than one to be added. The current Bad Code is just a general check to see if the bot fails after logging in, puts login info into one list and puts failed the login info into a second list if the bot fails.

That said, is there any way to incorporate the IF switch created from the Check for text presence into the current Bad End block that I have?

I'm not sure if I need to create a new list and new IF switch to dump the login info into if the failed login presence text is met or if I can just put the Check for text presence to the same variable {-Variable.login-} that I currently have in my bad code.
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)