I am botting social media, I am finding all instances of a Follow button. But sometimes there is a popup with a follow button, and behind the popup is another follow button.
I need a wait to discern whether the follow button is clickable
@jayjay You need to wrap wait for css into ignore error action and only then process [[WAS_ERROR]] variable
Check ignore error documentation inside BAS:
Сhecking coordinates AT> 100,100, what it makes no sense, so so on the coordinates 100,100 something yes there is.
So, in order ..., you need to get the element by coordinates and check whether it is the one or not.
I was able to do what I want by adding "Execute javascript on element" to loop and then self.parentElement.parentElement.querySelector('span').textContent
But I am still interested if something similar can be done with XPATH or CSS
edit: XPATH syntax is something like this
[[FOR_EACH_CSS]] >AT>[[CYCLE_INDEX]] >XPATH> ../following-sibling::td[1]
now last thing I am missing is how to do it with CSS
@darkstone said in Get element attribute from custom interface:
@fox i mean i need to get $('element').val() and store it on a variable that can i used inside BAS
Code for the "Run javascript in web interface" action:
Api.SetGlobalVariable("GLOBALVARIABLENAME", $('element').val())
It is better to hang the handler on this element so that when it is changed, it writes the result to a global variable. In this case, the global variable will always contain relevant information:
$("#element").change(function() {
Api.SetGlobalVariable("GLOBALVARIABLENAME",this.value)
});