We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
eh = ChromeEventHandler(self.Tab, self.SearchURL) self.Tab.Network.responseReceived = eh.response_Received self.Tab.Network.requestIntercepted = eh.request_intercepted self.Tab.Network.enable() self.Tab.Network.setRequestInterceptionEnabled(enabled=True) self.Tab.DOM.enable() self.Tab.DOM.getDocument() element = self.Tab.DOM.performSearch(query='xpath',includeUserAgentShadowDOM=True) print(element ) element__count = int(element.get('resultCount')) element__search_id = elemen.get('searchId') getSearchResults = self.Tab.DOM.getSearchResults(searchId= element__search_id, fromIndex=0,toIndex=element__count) print( getSearchResults) nodeId=NodeIds[X]
output: performSearch={"searchId": "14340.339", "resultCount": 1} getSearchResults={"nodeIds": [127]} NodeIds=[127]
now, how can i use the element(by nodeId) click method? thx
The text was updated successfully, but these errors were encountered:
I find the way: resolveNode = self.Tab.DOM.resolveNode(nodeId=NodeIds[0]) RemoteObjectId = resolveNode.get('object').get("objectId") self.Tab.Runtime.callFunctionOn(objectId=RemoteObjectId, functionDeclaration='(function() { this.click(); })')
Sorry, something went wrong.
@loveyuxiao hi~, thank you for your notes. I am researching the click. How do you locate the element and click it? Can you give a complete example?
No branches or pull requests
output:
performSearch={"searchId": "14340.339", "resultCount": 1}
getSearchResults={"nodeIds": [127]}
NodeIds=[127]
now, how can i use the element(by nodeId) click method?
thx
The text was updated successfully, but these errors were encountered: