Changing Element Visibility
Often when writing SST scripts, you'll encounter elements that exists behind divs. Even when selecting, these elements remain hidden. You can change the visibility of an element using the following:
#call the method and pass in an Id ( this can be other attributes)
cj.change_visibility_show('performanceReportDateDaySelect')
#method that uses javascript to change visibility
def change_visibility_show(self,id):
execute_script('document.getElementById("%s").style.display="block"; ' % id)
You can additional guards using javascript to ensure the element is not already in a visible state.
execute_script('document.getElementById("%s").style.display="block"; ' % id)
You can additional guards using javascript to ensure the element is not already in a visible state.
No comments:
Post a Comment