Jump to content
UBot Underground

Adding Wordpress Categories


Recommended Posts

Behavior for Wordpress is different via Ubot vs Manually.

 

I'm trying to automatically add a Category for Wordpress. As a simple test, I hardcode the category and run the bot. The category gets filled in the field but it is dimmed. When I click in the field, the original hardcoded category disappears.

 

See img examples of what the hardcoded vs manual versions look like...

 

post-292-12647821094653_thumb.jpg post-292-12647821161872_thumb.jpg

Link to post
Share on other sites

So when you make a new post you want to add a new category and select that one?

 

Or are you just trying to add categories?

 

The former. I'm trying to 1) make a post 2) add a new category

 

I first tried add the category via a list - then I tried to add it via a variable I hardcoded; same results for both methods

 

post-292-12647837590243_thumb.jpg

Link to post
Share on other sites

The attached worked for me. Whatever category you want just put it in the UI to test. After it adds it then it automatically selects it. I would put a long delay after you click add before you do anything else.

 

 

I'll give it a try. Thank you!

Link to post
Share on other sites
  • 2 years later...

this works for me in ubot 4

 

define CreateCategory(#postingCategory) {

LoginToSite()

navigate("http://{#site}/wp-admin/edit-tags.php?taxonomy=category", "Wait")

wait for browser event("Page Loaded", #waitForElementWaitTime)

wait for element(<name="submit">, "", "Appear")

change attribute(<id="tag-name">, "value", #postingCategory)

set(#sluggedSiteKeyword, $change text casing($replace(#postingCategory, " ", "-"), "Lower Case"), "Global")

change attribute(<id="tag-slug">, "value", #sluggedSiteKeyword)

click(<name="submit">, "Left Click", "No")

wait for browser event("Page Loaded", #waitForElementWaitTime)

wait for element(<name="submit">, #waitForElementWaitTime, "Appear")

}

 

can't remember why I put two waits at the end

 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...