Im trying to send a Wordpress post by Simple browser, everything works great! but when I get the tags field by id or name and set the value to the field value is set in Browser but when I publish the post my post published without tags. I tried many ways to do this (eg: get element by tag name, name, value, id, set attribute etc.) but the results are the same! the post published without any tags. Thanks for your help!
The Tags field element :
<input data-wp-taxonomy="download_tag" type="text" id="new-tag-download_tag" name="newtag[download_tag]" class="newtag form-input-tip ui-autocomplete-input" size="16" autocomplete="off" aria-describedby="new-tag-download_tag-desc" value="" role="combobox" aria-autocomplete="list" aria-expanded="false" aria-owns="ui-id-1">
My code Like this:
//Ttitle
b.Find("input", FindBy.Id, "title").Value = "TestPost";
//Discreption
var a = b.FindAll("textarea");
foreach (var item in a)
{
a.Value = "Test";
}
//Select Category
var c = b.Select(".selectit input[type='checkbox']");
foreach (var item in c)
{
if (item.XElement.Parent.Value.Contains("Article"))
{
item.Checked = true;
}
}
//Set Tags (This part is not working)
var tin = b.Find("input", FindBy.Id,"new-tag-download_tag");
foreach (var item in tin)
{
item.Value = "test1,test2,test3";
}
b.Find("publish").Click();
Im trying to send a Wordpress post by Simple browser, everything works great! but when I get the tags field by id or name and set the value to the field value is set in Browser but when I publish the post my post published without tags. I tried many ways to do this (eg: get element by tag name, name, value, id, set attribute etc.) but the results are the same! the post published without any tags. Thanks for your help!
The Tags field element :
<input data-wp-taxonomy="download_tag" type="text" id="new-tag-download_tag" name="newtag[download_tag]" class="newtag form-input-tip ui-autocomplete-input" size="16" autocomplete="off" aria-describedby="new-tag-download_tag-desc" value="" role="combobox" aria-autocomplete="list" aria-expanded="false" aria-owns="ui-id-1">
My code Like this://Ttitle
b.Find("input", FindBy.Id, "title").Value = "TestPost"; //Discreption
var a = b.FindAll("textarea"); foreach (var item in a) { a.Value = "Test"; } //Select Category var c = b.Select(".selectit input[type='checkbox']"); foreach (var item in c) { if (item.XElement.Parent.Value.Contains("Article")) { item.Checked = true; } } //Set Tags (This part is not working) var tin = b.Find("input", FindBy.Id,"new-tag-download_tag"); foreach (var item in tin) { item.Value = "test1,test2,test3"; } b.Find("publish").Click();