I need a help

mamo10

Новичок
Регистрация
07.10.2016
Сообщения
2
Благодарностей
0
Баллы
1
Hello every body I am a new user and use a demo version, I am love this program but I have problem with Dom Element for If logic statement or even Switch statment.

What I need is how to check if text presence in DOM or not, I tried many thing also watched many videos but still a problem.

For example I want make auto account creator for twitter signup but I want to check before if email was taken or not this is a message "This email is already registered. Want to login or recover your password?" and this my attempt.

first take a dom
seconde put regex for get a text and save into a var1
third make if logic for make something: for example remove email in a list.




then I tried select a tag method for our example is p; class "taken error active"


Just I want how to check if email is taken or continue the rest of bot.



Thanks
 

Вложения

Tobbe

Client
Регистрация
01.08.2013
Сообщения
428
Благодарностей
148
Баллы
43
I dont think {var1} contains what you think it contains. If you check the variables table you'll see that what you grab is different from what you're trying to compare it against.


'{-Variable.var1-}' == 'This email is already registered. Want to login or recover your password?'
which is the same as
'This email is already registered. Want to <a href="/login">login</a> or <a href="/account/begin_password' == 'This email is already registered. Want to login or recover your password?'
which ain't equal to each other and therefor will always result in FALSE.
 
  • Спасибо
Реакции: mamo10

mamo10

Новичок
Регистрация
07.10.2016
Сообщения
2
Благодарностей
0
Баллы
1
I dont think {var1} contains what you think it contains. If you check the variables table you'll see that what you grab is different from what you're trying to compare it against.


'{-Variable.var1-}' == 'This email is already registered. Want to login or recover your password?'
which is the same as
'This email is already registered. Want to <a href="/login">login</a> or <a href="/account/begin_password' == 'This email is already registered. Want to login or recover your password?'
which ain't equal to each other and therefor will always result in FALSE.

thank you for reply, yes I know that and I checked in var table in debug mode. The problem is when I try to find a new method for example "tag" in DOM I can't separate this class because this class for every thing good result or error result in email field on twitter ? "class "taken \ error\ active". So, how to solve this problem any hint or give me a hand?
 

Tobbe

Client
Регистрация
01.08.2013
Сообщения
428
Благодарностей
148
Баллы
43
The easiest is to find something unique with the alert and spot the difference of if it's active or not.
In this case there's a <p> element with the classes taken error active but while it's hidden it only got taken error.
So by checking if there's a DOM element existing with the first set of classes you can tell if it's hidden or not.
If the element isn't found, then the error isn't displayed. Not optimal but it should get you started.



There also is a wiki available.
http://zennolab.com/wiki/en:start
 

Вложения

  • 23 КБ Просмотры: 133

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