selenium webdriver - change size for select by javaScript in robot +python -
e = self._current_browser().find_element_by_xpath("//label[text()='" + label + "']/../..//select") print "e:", e self.execute_javascript("return arguments[0].size", e) self.capture_page_screenshot("c:/base.png") self.execute_javascript("arguments[0].size=1", e) fail : typeerror: sequence item 1: expected string, webelement found
how solve problem?
it appears label webelement have found using previous selenium find method. in context of find_element_by_xpath("//label[text()='" + label + "']/../..//select") must string. need ask text() part of label , use extract method string need.
Comments
Post a Comment