Hey I am a newbie on the meteor and currently trying to upload the image and I found filepicker.I have used jade-handlebars and coffeescript packages in my project.
Here is the code
test.coffee
FILEPICKER_APIKEY = 'Ay67d74M9SgadSy6uXJyu6'
Meteor.startup ->
console.log 'test client'
filepicker.setKey FILEPICKER_APIKEY
#filepicker.constructWidget document.getElementById "upload_widget"
Template.hello.greeting = ->
"Hello World."
Template.hello.events
'click input' : ->
if console?
console.log "You pressed the button"
Template.upload.rendered = ->
filepicker.constructWidget this.find '#upload_widget'
Template.upload.events
'change #upload_widget': (evt) ->
if console?
console.log JSON.stringify(evt.fpfile)
Here is the test.jade code
head
title helloworld
body
.container-fluid
.span6
{{> hello}}
.span6
{{> upload}}
template(name="hello")
#test
h1 Hello World!
{{greeting}}
input(type="button", value="Click")
template(name="upload")
input(type="filepicker", id="upload_widget")
Now Here is my question:
There seems to appearing two filepick button. One button works fine and image can be uploaded and when pressing other button the console show the following error uncaught exception: FilepickerException: API Key not found
Why is the second button appearing ??
Please help me out to remove the second non-functional button.
ThankYou in advance!!
Related
I am trying to click a button, which once clicked some text should appear. Selenium is not throwing any errors which means the buttons should have been clicked however the text is not appearing (it works manually).
<button class = "redButton one">
<img src = "images/name.png" class = redImage">
"Name"
</button>
I tried to click the button with the xpath: "//button[contains(text(), 'Name')]". I don't understand why the text is not appearing.
What is the expected text to be displayed after button click event? In order to help with this request, provide the HTML snippet of <button> before & after click event. Since this is working fine manually, did you try adding adequate wait time for the text to display?
What do I have:
Laravel 5.5
Laravel Dusk 2.0.14
How can I test (assert) that browser tooltip
was shown, when I'm trying to submit a form without filling required field?
What I've tried:
$browser
->assertSee('Please fill out this field');
But it didn't work.
You can get the message with JavaScript:
$message = $browser->script("return document.querySelector('input[name=foo]').validationMessage")[0];
$this->assertEquals('Please fill out this field.', $message);
Note that the message will always be set as long as the input's value is invalid. This assertion also works before you press the submit button.
I'm testing with Selenium WebDriver, RSpec and Capybara.
I let the program successfully fill in some fields in a modal window. Now I want to click on a button that is at the bottom of this modal window. At the first glance, I cannot see this button, so Capybara needs to scroll down in the modal window.
The two relevant code snippets of the webpage:
<div class = “modal”> </div>
<button class=”btn …..”> TextOnButton ::after </button>
I tried:
within('.modal') do
find('.btn', text: ‘TextOnButton').scrollIntoView(true)
end
but received the error message.
Unable to find visible css ".btn" with text "TextOnButton"
I tried:
within('.modal’) do
page.execute_script 'window.scrollBy(0,100)'
end
but then he scrolls the main window but not the modal window.
Assuming your HTML snippet is incorrect and the button element is actually contained in the modal (as in your text description), then you can try something like
within('.modal') do
btn = find(:button, 'TextOnButton', visible: :all)
execute_script('arguments[0].scrollIntoView(true)', btn)
btn.click
end
This work:
execute_script('arguments[0].scrollIntoView(true)', element)
I understand you are already executing code on the modal, but just wondering have you used driver.switchTo().window(handle) to switch to that modal first?
I am using Captcha Mvc 4.0 (Vyacheslav)
Here is my code:
#Html.Captcha("Refresh", "Enter the text shown in imag"
, 5, "Is required field.", false)
And here is the problem:
It is working smooth but refresh button is not showing, and it is due to style="display:none;"
<a href="#CaptchaImage" id="5f88fe4e11e743c6a8a8430de57cfcff"
onclick="______f9192ce4675540129ec6f99adc316d82________()"
style="display:none;">Refresh</a>
How to make it visible?
In the code he does a .show() which only works if jquery is loaded. To fix this either import jquery before calling the method or do the following which will separate out the markup and the script.
#{
var captcha = #Html.Captcha("Refresh", "Enter the text shown in imag"
, 5, "Is required field.", false)
}
#captcha.RenderMarkup()
#section scripts
{
#captcha.RenderScript()
}
JQuery file need to be loaded before that line
#Html.Captcha(....
And everything work smooth!
I am rather new to sharepoint and have been lucky enough to find the answer to all my questions with research. I have no found the answer to this question yet.... How do I add a text field WITHIN a folder that is WITHIN a document library. Example: I want to put instructions for upload within a specific folder. I tried to to the 'edit page' --> add text, but the text shows up at the top of ALL folders within that library and I just want it in one. Thank you for your assistance!
Kind regards,
Lanie
You can manage visibility of your message using JavaScript as below.
Don't directly add your message in text field; instead click of the text field you have added, and click "Edit HTML Source" in ribbon bar as highlighted in below image.
Then paste below code in newly opened window:
(Don't forget to replace "Your Message" and "FolderNameInWhichMessageToBeShown" in below code)
<div id="MyCustomMessage">
Your Message
</div>
<script type="text/javascript">
if(decodeURIComponent(document.URL).indexOf('FolderNameInWhichMessageToBeShown') == -1)
{
document.getElementById('MyCustomMessage').style.display = 'none'
}
else
{
document.getElementById('MyCustomMessage').style.display = 'block'
}
</script>
Click "OK" and Save your page.