http://www.srcf.ucam.org/~sas98/fapmap/
I was working on it a second ago and now it gives me a blank white page in Chrome and Safari.
Is it displaying for anyone?
EDIT: fixed, thanks!
1 error: unterminated string literal
var html = "<b>" + name + "</b> <br/>" + address "<br/;
You have javascript errors preventing your page from loading, open up a debugger in your browser and fix the problems and the page will load.
/~sas98/fapmap/:59Uncaught SyntaxError: Unexpected identifier (line 59)
/~sas98/fapmap/:69Uncaught ReferenceError: load is not defined (line 69)
Related
unexpected error even though there is no syntax error in the statement.
i have tried restarting Pycharm.
i tried coping and pasting the code into new tab where every word is pasted in a new line somehow.
can anyone help me find the issue?
this is the image of the error. https://i.stack.imgur.com/Gx8qZ.png
Check to make sure that the name of your variable doesn't contain any spaces. I recommend using snake or camel casing.
total_number_of_times = 1 #snake
totalNumberOfTimes = 1 #camel
I'm trying to access a search text box inside of our company's ERP system using Selenium. The screenshot shows the text box and the Xpath of the element.
This is a little tricky, because that Menu Search pop-up isn't really a pop-up. It somehow shows up when a user types Control + M.
By installing ChroPath and testing I've found the text-box always starts with the following string:
txtMenuSearch_Namespace_
I've tried to imitate what's described here, here and here with no luck.
The latest attempt in the snippet of my code looks like this:
menu_search_input_box_elements = driver.find_elements_by_xpath("//*[contains(#id, ‘txtMenuSearch_Namespace_’)]")
for item in menu_search_input_box_elements:
print(item)
I get the following error message:
SyntaxError: Failed to execute 'evaluate' on 'Document': The string '//*[contains(#id, ‘txtMenuSearch_Namespace_’)]' is not a valid XPath expression.
In all my attempts to get the syntax right I keep getting this message. Any help in figuring out how to .send_keys() to this field is greatly appreciated.
You get en error because of the ‘’ quotes, replace them with correct ones.
# id starts with txtMenuSearch_Namespace_
menu_search_input_box_elements = driver.find_elements_css_selector("[id^='txtMenuSearch_Namespace_']")
menu_search_input_box_elements = driver.find_elements_by_xpath("//*[contains(#id, 'txtMenuSearch_Namespace_')]")
I am trying to Debug.Print a value in the immediate window of an input text field
so when found that this line can be executed in the console
document.querySelector("#txtCaptcha").value
I thought it may be useful for me if I could get that value into the immediate window
I have tried such line but returned nothing in the immediate window (no error occurred but nothing in the immediate window)
Debug.Print .ExecuteScript("document.querySelector('#txtCaptcha').value;")
Simply I am searching for a way to be able to get the value from javascript command. I have no idea about javascript so I am stuck
You are mixing HTMLDocument and Selenium examples in the above.
You cannot return text in either scenario from ExecuteScript (or execScript for IE) direct. Use your script to write the value to an existing node (or create a new one) and then read from that via DOM parser.
Dim s As String
s = "captcha = document.querySelector('#txtCaptcha').value;" & _
"document.title = captcha;"
.ExecuteScript s
.FindElementByTag("Title").Text
But if FindElementById("txtCaptcha").Attribute("value") doesn't return the value I would be surprised if using javascript will. Though testing with javascript in browser using url from a prior question of yours does return the value.
I have a small script to auto-input data into a website after clicking some buttons to get to the inputboxes
Here the snippet that won't work:
$findButton = _ImageSearch('pioTextbox.bmp', 0, $x, $y, 0)
if $findButton Then
MouseMove($x + 10, $y + 10)
Sleep(500)
MouseClick("left")
Send("{9}")
Sleep(1500)
It successfully finds the input boxe and clicks, but simply doesn't send '9'
Note: The textbox only allows digits(just numbers)
I tried using {Numpad9} but with no difference.
Thanks for any ideas of how to send numbers where only digits are allowed
This is using firefox also, but I can use any browser
Turns out it suddenly started working, I changed something completely different and now its working with Send("{9}")
Thanks
When I load my Express webpage I'm getting the following error:
Express
500 Error: /app/views/index.jade:114 112| td 2 113| td 4 years > 114| input is self closing and should not have content.
112| td 2
113| td 4 years
> 114|
input is self closing and should not have content.
at Object.Compiler.visitTag (/app/node_modules/jade/lib/compiler.js:434:15)
at Object.Compiler.visitNode (/app/node_modules/jade/lib/compiler.js:210:37)
at Object.Compiler.visit (/app/node_modules/jade/lib/compiler.js:197:10)
at Object.Compiler.visitBlock (/app/node_modules/jade/lib/compiler.js:278:12)
at Object.Compiler.visitNode (/app/node_modules/jade/lib/compiler.js:210:37)
at Object.Compiler.visit (/app/node_modules/jade/lib/compiler.js:197:10)
at Object.Compiler.visitTag (/app/node_modules/jade/lib/compiler.js:443:12)
at Object.Compiler.visitNode (/app/node_modules/jade/lib/compiler.js:210:37)
at Object.Compiler.visit (/app/node_modules/jade/lib/compiler.js:197:10)
at Object.Compiler.visitBlock (/app/node_modules/jade/lib/compiler.js:278:12)
This doesn't show up when run locally with foreman start, only when its on the server.
Looks like you've got content inside your input tags. In HTML, input tags can't have content, therefore you should delete any whitespace or characters following input tags in your jade file.
Ex:
input(type="text",name="whatever") something
should be input(type="text",name="whatever",value="something")
Sometimes the answer is a little tricker than just some content after the tag on the same line (such as a few spaces). Watch out for the line following the input tag being indented by mistake!
After running into the same error I was checking the line of jade template marked in error report. It was actually containing input definition, but that definition was fine for there wasn't any whitespace and printable content succeeding it. The following line was even less indented (two levels up for starting another row of form) and thus there was definitely no content to input element defined in marked line.
However there was another input succeeding this marked one a few lines down the template. And that input element indeed was having some subordinated content. Removing content there was fixing somewhat false positive "here".
I had a similar problem I solved with this:
div
+inputWithTextContent('whatever', 'something')
mixin inputWithTextContent(name, message)
!='<input type="text" name="'+name+'">'+message+'</input>'
Another solution is to create a label after the input and then display it inline. This will sit the label along side the control. This is how I solved the issue with a checkbox input in jade.
JADE (Bootstrap):
.checkbox
label
input(type='checkbox', value='remember-me',)
label.inlineLabel Remember me
SASS:
label.inlineLabel
display: inline