Type in custom css of wordpress need solution (type or xtype)

@admin @Plankton @ulrich

I’m tring to type some lines in additional css box in wordpress but with type and Xtype do not recognize the box and open other menu in browser.

I added xpath, make a Xclick to set focus but seems focus not showed and after Xtype not working.

Any suggestion ?

To show the box you need to go in wordpress admin with login and after go

Appearance
Customize
Additional CSS (the last menu)

Enter and you will find the box like this image

If you find a demo of wordpress admin there are more on google, search wordpress demo and you login like admin to test

These are sites that provide demo of wordpress admin

https://www.softaculous.com/demos/WordPress

On google with Wordpress demo you wil find more sites.

I tried to recorder the type command but seems save part of html like content, i type 123 and save this content that i have not added in my macro.

{
“Command”: “editContent”,
“Target”: “xpath=//*[@id=“customize-control-custom_css”]/div[2]/div[5]/div/div/div/div/div[5]”,
“Value”: “<div style=“position: relative;”><div class=“CodeMirror-gutter-wrapper” style=“left: -30px;” contenteditable=“false”><div class=“CodeMirror-linenumber CodeMirror-gutter-elt” style=“left: 0px; width: 21px;”>1<pre class=” CodeMirror-line " role=“presentation”><span role=“presentation”><span class=“cm-number”>123<div style=“position: relative;” class=“CodeMirror-activeline”><div class=“CodeMirror-activeline-background CodeMirror-linebackground” contenteditable=“false”><div class=“CodeMirror-gutter-background CodeMirror-activeline-gutter” style=“left: -30px; width: 30px;” contenteditable=“false”><div class=“CodeMirror-gutter-wrapper CodeMirror-activeline-gutter” style=“left: -30px;” contenteditable=“false”><div class=“CodeMirror-linenumber CodeMirror-gutter-elt” style=“left: 0px; width: 21px;”>2<pre class=" CodeMirror-line " role=“presentation”><span role=“presentation”><span class=“cm-number”>123"
}

Thanks for suggestions

This is a rich-text control. I recorded the text entry and the RPA software automatically selects the editContent command. This command works by getting (during record) and then re-inserting (during replay) the complete HTML content of this control.

Does this answer your question? Or do you have a problem with this HTML?

1 Like

Alternatively the XClick/XType visual automation solution works as well:

1 Like

Hello admin

You were very good to realize this automation to me by some problems

  1. I can’t detect xpath/id “id-editor-keyboard-trap-help-4” ui vision doesn’t save me during recording and I don’t understand what item it corresponds.
    I tried with other addon but i can not see this xpath/id “id-editor-keyboard-trap-help-4”

  2. I can’t after writing to save. it seems that the button is not clickable and I can not understand what the problem depends (perhaps an incorrect xpath)

I can not understand but in some moments saves me the text and after reloading the page does not appear, at other times it seems that the save button is not clickable, I can not well understand the problem I can not insert a multi-line css and save it.
If you can please try to save the text multiline and then reload the page and see if it’s all working, thank you

If please you can add to your macro code the save of the css and after you can publish the code in the forum so I try it.

Thank you

I solved the problem with a better solution

A new xpath working well and need not focus or xmodules for better compatibility

{
  "Command": "type",
  "Target": "xpath=//textarea[@class='code']",
  "Value": "LINE LINE \\n\\nLINE LINE \\n\\nLINE LINE \\n\\nLINE LINE \\n\\nLINE LINE \\n\\n"
},

Great! How did you find this better XPath? Did you use a certain tool for it?

I switched via prodile to regular textarea box to have an easy xpatch to detect, after I taked xpath for textarea (simple with firefox addon truepath) and after I set again rich-text control format and the xparh of textbox continue to work.

To detect xpath I use this firefox addon truepath

Here image

1 Like