selenium Unable to locate tiktok caption - tiktok

After login into tiktok with selenium the selenium can't find the caption input field. my code is this
cap = driver.find_element(By.CLASS_NAME, 'public-DraftStyleDefault-block')
cap.send_key('this is test caption')
Error Is this
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":".public-DraftStyleDefault-block"}
(Session info: chrome=108.0.5359.99)
Stacktrace:
Backtrace:
(No symbol) [0x010EF243]
(No symbol) [0x01077FD1]
(No symbol) [0x00F6D04D]
(No symbol) [0x00F9C0B0]
(No symbol) [0x00F9C22B]
(No symbol) [0x00FCE612]
(No symbol) [0x00FB85D4]
(No symbol) [0x00FCC9EB]
(No symbol) [0x00FB8386]
(No symbol) [0x00F9163C]
(No symbol) [0x00F9269D]
GetHandleVerifier [0x01389A22+2655074]
GetHandleVerifier [0x0137CA24+2601828]
GetHandleVerifier [0x01198C0A+619850]
GetHandleVerifier [0x01197830+614768]
(No symbol) [0x010805FC]
(No symbol) [0x01085968]
(No symbol) [0x01085A55]
(No symbol) [0x0109051B]
BaseThreadInitThunk [0x7680FEF9+25]
RtlGetAppContainerNamedObjectPath [0x77357BBE+286]
RtlGetAppContainerNamedObjectPath [0x77357B8E+238]
How to fix this...
i try to automate tik tok video upload.

Related

Dart number_format.dart suddenly won't compile

I made a small change in my server code not related to formatting numbers and now the dart library number_format.dart won't compile giving me 12 errors and two warnings. number_format is in intl as noted in the comments and the first error is at line 106. Some or most of the other errors appear to cascade from a first error.
Does anyone know how I may resolve this? I presume I need to edit something in my yaml file.
EDIT
If I choose Tools-> Pub Upgrade then I get the pre-build Problems below This weekend I could choose Tools->Pub Build - Debug but at the moment this does not work. Deleting .pub and following Günter Zöchbauer's suggestion allowed me to do a build Sunday - I hope is still does.
Pre-build Problems output:
Errors:
Line 106: Expected an identifier
Line 106: Expected to find ':'
Line 106: Unexpected token '?'
Line 131: Unexpected token '?'
Line 132: Expected an identifier
Line 132: Expected to find ':'
Line 233: Expected an identifier
Line 233: Expected to find ':'
Line 233: Unexpected token '?'
Line 545: Expected an identifier
Line 545: Expected to find ':'
Line 545: Unexpected token '?'
Warnings:
Line 106: Conditions must have a static type of 'bool'
Line 545: Conditions must have a static type of 'bool'
Hint:
Line 425: When compiled to JS, this test might return true when the left hand side is an int
Thanks

What is causing this Polymer.dart to misbehave in Safari versus Chrome?

The (post pub build) app is at http://mycommunity.org.
Look at the console in both Safari and Chrome. In the former, there's:
[Error] Element name could not be inferred.
b (polymer.js, line 12)
(anonymous function) (mycommunity.org, line 5709)
[Error] Element name could not be inferred.
b (polymer.js, line 12)
(anonymous function) (mycommunity.org, line 5917)
[Error] Element name could not be inferred.
b (polymer.js, line 12)
[Log] +WovenApp (index.html_bootstrap.dart.js, line 8353)
[Log] +AddStuff (index.html_bootstrap.dart.js, line 8353)
[Log] +InboxList (index.html_bootstrap.dart.js, line 8353)
[Error] SyntaxError: DOM Exception 12: An invalid or illegal string was specified. (platform.js, line 13)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (current-user, line 0)
[Error] TypeError: 'null' is not an object (evaluating 'String(a.constructor).match(/^\s*function\s*(\S*)\s*\(/)[1]') (index.html_bootstrap.dart.js, line 1283)
Wow, the culprit was this line which I now commented out. (I'm not even sure what the exact issue is with that line yet.)
https://github.com/DaveNotik/dart-stack/commit/5131fb225d068e23435759913f72d5346d4efc70#diff-53e52681924d78ddb4512d6f988c91cbR85
Hide yo kids, hide yo wives, your whole Polymer app can break without much notice and only after dart2js. Good ol' Git, I reset to the commit where it worked and identified the commit where it suddenly didn't and went through line by line.

Java Metro Client Throwing WstxParsingException

I have a Metro web service client that is throwing a com.ctc.wstx.exc.WstxParsingException.
If I am reading it correctly, it's saying that "3" is an invalid XML character. Is that correct? What is an "expansion character" and why would "3" be invalid?
Full stack trace:
Exception in thread "main" com.sun.xml.ws.encoding.soap.DeserializationException: Failed to read a response: javax.xml.bind.UnmarshalException
- with linked exception:
[com.ctc.wstx.exc.WstxParsingException: Illegal character entity: expansion character (code 0x3) not a valid XML character
at [row,col {unknown-source}]: [2,4154]]
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:124)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89)
at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:140)
at $Proxy34.getSubInfoByRel(Unknown Source)
at com.my.company.client.SOAPClient.getSubscriberInfoByTN(SOAPClient.java:237)
Caused by: javax.xml.bind.UnmarshalException
- with linked exception:
[com.ctc.wstx.exc.WstxParsingException: Illegal character entity: expansion character (code 0x3) not a valid XML character
at [row,col {unknown-source}]: [2,4154]]
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:426)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:362)
at com.sun.xml.bind.v2.runtime.BridgeImpl.unmarshal(BridgeImpl.java:120)
at com.sun.xml.bind.api.Bridge.unmarshal(Bridge.java:233)
at com.sun.xml.ws.client.sei.ResponseBuilder$DocLit.readResponse(ResponseBuilder.java:547)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:121)
... 5 more
Caused by: com.ctc.wstx.exc.WstxParsingException: Illegal character entity: expansion character (code 0x3) not a valid XML character
at [row,col {unknown-source}]: [2,4154]
at com.ctc.wstx.sr.StreamScanner.constructWfcException(StreamScanner.java:605)
at com.ctc.wstx.sr.StreamScanner.throwParseError(StreamScanner.java:461)
at com.ctc.wstx.sr.StreamScanner.reportIllegalChar(StreamScanner.java:2375)
at com.ctc.wstx.sr.StreamScanner.checkAndExpandChar(StreamScanner.java:2321)
at com.ctc.wstx.sr.StreamScanner.resolveCharEnt(StreamScanner.java:2277)
at com.ctc.wstx.sr.StreamScanner.fullyResolveEntity(StreamScanner.java:1468)
at com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:2755)
at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1019)
at com.sun.xml.ws.util.xml.XMLStreamReaderFilter.next(XMLStreamReaderFilter.java:92)
at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:192)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:360)
... 9 more
The issue was that (code 0x3) is a Unicode code point and as such an illegal XML character. The owners of the data have been informed. Thanks to Josh from the Woostox mailing list for the help.

How to create a file name with current date & time in lua?

I want to write a table into a file which named by the date and time it created.
I can open a file with hard coded name, write the table into it, like below:
FILENAME_EVENTS="Events.txt" -- filename in string
local fp=io.open(FILENAME_EVENTS, a) -- open a new file with the file name
io.output(FILENAME_EVENTS) -- redirect the io output to the file
-- write the table into the file
for i, e in ipairs(eventlist) do io.write(e.title, e.category, e.ds, e.de, e.td) end
But when I try to:
FILENAME_EVENTS=os.date().."\.txt" -- filename in string with date
local fp=io.open(FILENAME_EVENTS, a) -- open a new file with the file name
io.output(FILENAME_EVENTS) -- redirect the io output to the file
-- write the table into the file
for i, e in ipairs(eventlist) do io.write(e.title, e.category, e.ds, e.de, e.td) end
I got an error
bad argument #1 to 'output' (10/06/11 17:45:01.txt: Invalid argument)
stack traceback:
[C]: in function 'output'
Why this "10/06/11 17:45:01.txt" is an invalid argument? due to it contains spaces or '/'? Or any other reasons?
BTW, the platform is win7 Pro + Lua 5.1.4 for win
Apparently it's both / and : that bork. The first probably because it is regarded as directory separator. This can be demonstrated as below:
fn=os.date()..'.txt'
print(io.open(fn,'w')) -- returns invalid argument
fn=os.date():gsub(':','_')..'.txt'
print(io.open(fn,'w')) -- returns nil, no such file or directory
fn=os.date():gsub('[:/]','_')..'.txt'
print(io.open(fn,'w')) -- returns file(0x...), nil <-- Works
BTW, instead of using strange gsub and concatenation tricks, you might also consider using something like
fn=os.date('%d_%m_%y %H_%M.txt')

Vim: How do I tell where a function is defined? (

I just installed macvim yesterday and I installed vim latex today.
One of the menu items is calling a broken function (TeX-Suite -> view).
When I click on the menu-time it makes this call:
:silent! call Tex_ViewLatex()
Question: Where can I find that function? Is there some way to figure out where it is defined?
Just for curiosity sake I removed the silent part and ran this:
:call Tex_ViewLatex()
Which produces:
Error detected while processing function Tex_ViewLaTeX:
line 34:
E121: Undefined variable: s:viewer
E116: Invalid arguments for function strlen(s:viewer)
E15: Invalid expression: strlen(s:viewer)
line 39:
E121: Undefined variable: appOpt
E15: Invalid expression: 'open '.appOpt.s:viewer.' $*.'.s:target
line 79:
E121: Undefined variable: execString
E116: Invalid arguments for function substitute(execString, '\V$*', mainfname, 'g'
)
E15: Invalid expression: substitute(execString, '\V$*', mainfname, 'g')
line 80:
E121: Undefined variable: execString
E116: Invalid arguments for function Tex_Debug
line 82:
E121: Undefined variable: execString
E15: Invalid expression: 'silent! !'.execString
Press ENTER or type command to continue
I suspect that if I could see the source function I could figure out what inputs are bad or what it is looking for.
Use the :verbose prefix command:
:verbose function Tex_ViewLaTeX
In the second line of output (just above the function's body) is the location of where the function was defined.
I installed gVim 7.2 on windows and latex-suite, and miktex too
I tried what you said, after compile and view, I can view the dvi files
The error message seemed like to indicate it's the view's problem
The document for latex-suite said the viewer for Macintosh is not set, maybe it's where the problem lies
I think you can try to set a few variables in your .vimrc file, to set up the proper viewing app for PDF files
And the source code for Tex_ViewLaTeX is here:
http://www.tedpavlic.com/research_related/tpavlic_masters_thesis/compiler.vim
By the way, I also installed MacVim on my Macbook Pro, however I never used vim for LaTeXing, because I find TextMate and its latex bundle is much superior than MacVim, you'll definately like it
One way to search would be to do a grep or vimgrep on directory tree where you thought the source file was located. Search for 'function Tex_ViewLatex' or 'function! Tex_ViewLatex'.
I believe in the usual install it would be in a .../ftplugin/latex-suite/compiler.vim file, as part of the latex-suite plugin. There are a couple ftplugin directories, so make sure you get right one (one is in tree of main vim install and other may be off your home .vim directory.
It seems there is a bug with the Tex_ViewLatex function on OS X. Check here for some info:
http://comments.gmane.org/gmane.comp.editors.vim.latex.devel/775
Put this in your .vimrc, solved the problem for me.
let g:Tex_ViewRule_pdf = 'open -a Preview.app'

Resources