How to make use of question alert button using sweetalert in laravel? - laravel

I use RealRashid\SweetAlert\Facades\Alert, to create a confirmation alert, however i don't know how to set a statement to the alert button.
i'm using this line of code:
Alert::question('Promoted To Admin?', 'Make this user as system admin?')
and this is the output
Is there a way for me to add a statement to the button?, For example if okay button is click proceed with the next process and if cancel button is click on the sweetalert, cancel any process.

As per my suggestion , you should be use that library.
https://sweetalert.js.org/guides/
It is completely modified library. We can do anything in this library.

Related

Slack Golang attachment button click is not firing interactively

I am using the following example from slack-go at https://github.com/slack-go/slack/blob/62fceeadbaea9ead0f2209e82863b1ca81a24bd8/examples/buttons/buttons.go. I managed to send the attachment as shown in screenshot, but when i click on the button, it seems like both were click but not doing anything. I have tried SocketMode and non-socketmode, the result is still the same. If I use normal button action as Block, then it works, but button action in Attachment doesn't seems to work. I have created /actions in Slash Command as well but still not working. Anyone knows the problem ?
I managed to solve the problem. I just need to add an Interactive Url with ngrok tunnel to my bot server. Initially i created in the Slash Command section but then I realized I need to do it at the Interactive & Shortcuts section. But my main concern is the UI click. When I click on the button, both button grays out, is this normal ?

How do my next line of code will be executed even if the page load is not completed after a button click?

I have a situation like below.
I am passing the url and login page is appearing. After clicking in the Sign In button one certificate window will come up(windows popup kind of thing). The page will load for infinite time until and and unless you click on the OK button of the certificate popup.
As the page is still loading (i.e there are some console call happening) the control wont go to the next line of code where i have written logic to click on the OK button. Hence you cannot click on the OK button of the certificate window until the page load completes. So my point is how do i click on the OK button forcefully even if the page is loading infinitely.
I tried browser.refresh() also nothing is working for me. I believe the reason is due to the control flow of protractor. i.e until and unless the last promise resolves the next command wont be executed.
I would be much happy if somebody help me on the above scenario.
Thanks,
Sudhansu

install shield basic msi . How to display an error dialog when the entered configuration file path is valid

I used CheckTargetPath = 0 to validate the entered path in the textbox events. It doesn't let past to the next dialog if the path entered is not valid. But I want to display either an error message in another textbox in the same dialog or in another dialog box. Please advice.
Make a clone of the SetupError Dialog, and make it look nice.
on the behavior section of your button "Next":
add the condition CheckTargetPath=0 to the NewDialog actions
add a SpawnDialog (your New dialog) with a condition CheckTargetPath<>0
That way the user will be trapped on that dialog until you action return 0.
Don't forget to cover the unattended mode.

Google App Script Debugger not working on ClickHandler callback

I've followed the Google app script tutorial here which is a very simple script with two functions. showDialog (which presents a dialog box with a text field and submit button ) and respondToSubmit(e) which handles the submit button and adds the entered data to the spreadsheet.
It works fine.
What doesn't seem to work is the debugger on the callback. So I place a breakpoint in both functons and start the showDialog function. The debugger kicks in and stops execution at the breakpoint. I click continue so I can interact with the newly opened dialog box. However when I click the submit button the debugger does not start again. The respondtoSubmit(e) function is executed. The debugger just does not stop on the breakpoint(s).
Is there a problem with debugging callbacks like this or can you only debug one function at a time?
For reference Utilities.jsonStringify(e) is depricated, use JSON.stringify() and JSON.parse() instead.
As of right now, the debugger has some unexpected behaviours. Mostly, it seems to only respect breakpoints during calls from the script editor, so to debug your event handler you must call it from the debugger, not the UI. If you need to peek into variables such as the event object passed to the function, for example, try adding this line to your handler where you'd normally put a breakpoint:
Logger.log(Utilities.jsonStringify(e));
Then view the log from the script editor after execution.
It seems to me that the Logger does not work either, unless run from the script editor. I did manage Browser.msgbox(Utilities.jsonStringify(e)) which had brought the (expected) result:
{"parameter":{"clientY":"45","clientX":"37","eventType":"click","ctrl":"false","meta":"false","source":"u12053277590","button":"1","alt":"false","myTextBox":"babi","screenY":"381","screenX":"598","shift":"false","y":"13","x":"33"}}

Problem with Pop-up Windows using Selenium

I'm new to the testing world, so my question might seem a lil' bit too naive and stupid. At risk of looking/sounding stupid, my question is this:
I've been trying to test the contents in a pop-up window on my company's web app. I've figured out how to detect the pop-up window for now, but i can't get selenium to 'click' on the link inside of that pop-up window. there are multiple pop-ups in this web app so it's really difficult for a newbie like to create a test case.
I tried the click, clickAndWait, mouseDown and mouseKey as an option but it is still not working. can somebody guide me through this?
TIA,
Angela
When the popup appears you will need to move the context of the script over to the window.
You can do this by using the selectWindow | window_ID_from_the_link and then do the clicking.
If that doesn't work you may need to use the openWindow command to create the popup and then start testing against that.
Use getConfirmation/getassert/getprompt according to the type of the pop up you use .....By default they will be clicked with ok option by the server and you have to consume the message from the pop up for the other selenium commands to work correctly.............
The above suggestion is given from my experience in working with selenium RC used with perl..........
Perhaps you can try the FireFox Plugin. You can click through your application and record your steps. After recording the steps you can easily save it as some sort of file or unittest.
I'm not sure about the command you should use for the popups, maybe the firefox plugin will help in this manner (it will create your commands).
If you created the popup with a div tag, U can use following code to stop the selenium server until the popup opens.
int second = 0;
while(!selenium.IsElementPresent(mylink))
{
if(second >= 5)
break;
Thread.Sleep(1000);
second++;
}
After a popup opens, Now you can click on any link inside the popup.You have to use the below code.
selenium.click("id=popup_link"); (popup_link is the id of the link present on the popup)
Good Luck.
Not sure if this is what you are looking for, but if you want to click on something specific that Selenium is not able to handle - like browser pop-ups or other pop-ups, you can use Sikuli Script. Sikuli does an image comparison and clicks on the same - this is very powerful.
Here is the link: http://www.sikuli.org/

Resources