Slack Golang attachment button click is not firing interactively - slack

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 ?

Related

How to make use of question alert button using sweetalert in 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.

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

parent & child browsers view got switched during automated execution by HP UFT

I am facing a strange issue with my test automation scripts when executed through HP UFT 12.01
Our AUT is a web based application developed in actimize. During my test flow, lets say at 5th step i need to invoke a popup browser (child) from my main page. The new popup browser will not have any menus or back/fwd buttons.
3 out of 10 executions, during 5th step my main browser gets refreshed to invoke the popup and when popup rendered fully, contents and views got switched now. i.e., main browser has the contents which are supposed to display in popup window (with menu bar and back/fwd buttons) and pop-up window has main page contents (without menu bar, back/fwd buttons) & state when i performed click operation.
This is strange and i could not really conclude if its browser issue or UFT issue. I have also checked with functional team and they never faced, so this is happening only through UFT execution and speculating it could be UFT issue.. any help pls?
This sounds like it could be either:
1) an actual bug in your UAT
2) a problem with QTP object identification.
If it's #2, here's some things to check. First, make sure that QTP can correctly and reliably identify the two different "browsers". (i.e. while both are on the screen, use the "Highlight in Application" button found the Object Repository window while each of the objects is selected. I would try this for both a normal run and immediately after the browsers get switched (use a break point if necessary)
If there is a problem with QTP identifying the windows incorrectly, then you might want to add additional Description properties to the test object in the OR so that it can lock onto the right one more reliably. I usually use GUISpy to spy on something on the page, then in Object hierarchy I click on the top object (the browser), then click "Copy identification properties to the Clipboard" button, then paste the results into a notepad. Find one of those properties that uniquely identifies the browser objects from anything else. Sometimes I have to use the URL property (with some REGEX magic to isolate the specific page without making it TOO specific)

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