Weebly

  • Автор темы Автор темы Sun323
  • Дата начала Дата начала

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
 

Вложения

  • weebly screen shot - Copy.jpg
    weebly screen shot - Copy.jpg
    295,9 KB · Просмотры: 608
Последнее редактирование:
Have you tried checking the source code, both before & after, for any differences? Use WinMerge to find out.
 
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?
 
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.
 
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.
 
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
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!
 
No drama!

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

Capture_3.jpg~original
 
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.
 
You might be able to capture it with the Get action:

Capture_4.jpg~original

It might be tricky to capture it via this method, as I used Fiddler.
 
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?
 
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.
 

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