Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- I need your advide or idea or whatever.
- XenForo:
- We have a python function "Get element list when id contains" with parameter "_xfUid-".
- This function will get all the elements when their id's contain "_xfUid-" and save them in a local variable.
- Now when setting the username/password/email to register, we have a function "Send keystroke when attribute of element in list contains".
- We can feed 2 parameter to that function: Attribute to look for "autocomplete", and the attribute value "username".
- So what that does is, it search in the grabbed element list for elements with attribute "autocomplete" and value of "username" snd when found send keystrokes to that (setting the username).
- Here is the corresponding xenforo input field:
- <input type="text" class="input" name="3d244745b3dc8e119a29afb08b56b3e1e887982f" autocomplete="username" required="required" autofocus="autofocus" maxlength="25" id="_xfUid-2-1716287180">
- As you can see, the name is dynamic, so I needed other ways to locate the element.
- The issue is the 2 separate functions, get element list and send keystrokes. Would it be better to join them into 1 function with parameters like:
- element identifier (_xfUid-)
- attribute name (autocomplete)
- attribute value (username)
- Something like "Locate element where ID contains "_xfUid-", attribute is "autocomplete" and attribute value is "username"?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement