Weebly

Sun323

Client
Регистрация
14.12.2012
Сообщения
14
Благодарностей
0
Баллы
1
Hi,

When setting up an account creator for weebly.com, I need to be able to check if a selected subdomain is available or not. If its not available an image of a red x appears along with the text "taken" under.

If its available there is an image of a green check mark and the text "available" is present.

I have tried using action designer and then checking logic if present, but I can not get it to work properly. It never correctly confirms the presence of the text or image. I have tried both.

What should I be using to detect the text?

Thanks
 

Вложения

Последнее редактирование:

shabbysquire

Client
Регистрация
25.11.2012
Сообщения
544
Благодарностей
26
Баллы
28
Have you tried checking the source code, both before & after, for any differences? Use WinMerge to find out.
 

Sun323

Client
Регистрация
14.12.2012
Сообщения
14
Благодарностей
0
Баллы
1
Thanks for the reply. I tried and it says both are identical. I used page source, is that that what I should be looking at?
 

shabbysquire

Client
Регистрация
25.11.2012
Сообщения
544
Благодарностей
26
Баллы
28
They (page source) are the same. If a domain is taken, and you select continue, it's displays the following: The site name you entered is not available. Please choose another.

You can try to grab that message. Or check the presence for a success message on the next page.
 

Sun323

Client
Регистрация
14.12.2012
Сообщения
14
Благодарностей
0
Баллы
1
I couldn't get it to work using that either. Even if I could, I then run into other problems in that if I want to check a list of possible subdomains for a project, if its good it will register it and then I need to delete it to check another. Really need to get it working off of that initial confirmation. Ive tried just about every thing, using different elements, creating regex to take text, etc. I somewhat understand the basics of using action designer and regex, but if something throws me a curve ball I need help as I'm still learning. So I may be missing something that's a simple solution.
 

shabbysquire

Client
Регистрация
25.11.2012
Сообщения
544
Благодарностей
26
Баллы
28
You need to take the width of the image, as both are different. If the domain is unavailable, then the image width is: 34 px. If 34 px is detected, then try again. If value is: 0, then you're ok to proceed.

See template attached (a rush job).
 

Вложения

  • Спасибо
Реакции: britalic

Sun323

Client
Регистрация
14.12.2012
Сообщения
14
Благодарностей
0
Баллы
1
Thank you so much! I plugged that into my template and for the first time it actually worked! Unfortunately after several checks it would no longer detect the image. I change the attribute to the width and it is now working with no problems! Never worked with images like that, only text so this was a great lesson!

Once again thanks!
 

shabbysquire

Client
Регистрация
25.11.2012
Сообщения
544
Благодарностей
26
Баллы
28
No drama!

You can also use the Get action to check the body - see lines 47:

 

Sun323

Client
Регистрация
14.12.2012
Сообщения
14
Благодарностей
0
Баллы
1
Where do you find the body. I think I'm confused. Checked DOM-text and page source but that's not what your looking at.
 

shabbysquire

Client
Регистрация
25.11.2012
Сообщения
544
Благодарностей
26
Баллы
28
You might be able to capture it with the Get action:


It might be tricky to capture it via this method, as I used Fiddler.
 

Sun323

Client
Регистрация
14.12.2012
Сообщения
14
Благодарностей
0
Баллы
1
Is Fiddler like firebug or Web developer on Firefox? I've played around but still couldnt find the "error" and "success" msg.

Once you have parsed the header and content, do you use regex to search for the text then confirm with logic?
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 707
Баллы
113

shabbysquire

Client
Регистрация
25.11.2012
Сообщения
544
Благодарностей
26
Баллы
28
Is Fiddler like firebug or Web developer on Firefox? I've played around but still couldnt find the "error" and "success" msg.

Once you have parsed the header and content, do you use regex to search for the text then confirm with logic?
It might be easier to stick with the original image workaround.

Fiddler is a free third-party http debugging tool, and it's worth getting into especially when using ZP. Search YT for tuts.
 

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