I am able to click on Email link but not able to enter the username and test Complete shows "Waiting until the control is activate" only.
var UserName = returnScreenPortal().ParentalLockViewNavigator.LoginForm.Username;
UserName.Click(180 , 40);
UserName.Keys("jcasale#rosettastone.com");
var Password = returnScreenPortal().ParentalLockViewNavigator.LoginForm.Password;
Password.Click(180 , 40);
Password.Keys("password");
I think that you are facing the situation that is described in the Calling Methods Asynchronously help topic. You need to click the email link asynchronously using the CallObjectMethodAsync method as it is described in the topic.
Related
I want to program a simple Outlook add-in that opens a browser and take the user to a specific site.
I've had a look at using Yeoman, but this add-in opens a task pane where I'm just looking to take that single actions.
Is there a simple way to do this?
EDIT:
I managed to get this done, but I not have the following issue: I have a single button (via Yeoman's generator) that when clicked executes the following:
function action(event) {
const message = {
type: Office.MailboxEnums.ItemNotificationMessageType.InformationalMessage,
message: "Window opened.",
icon: "Icon.80x80",
persistent: true,
};
// Show a notification message
window.open("https://myurl.com");
Office.context.mailbox.item.notificationMessages.replaceAsync("action", message);
// Be sure to indicate when the add-in command function is complete
event.completed();
}
I get the following error in Outlook itself:
We deployed the app using the MS 365 admin center, but I'm not sure if there is something additional that I need to do in this case to run the webserver?
There is an Office.js API that will open a browser window:
Office.ui.openBrowserWindow( -- URL string here -- );
This will cause the computers default browser to open to the specified URL. You could have a button in the task pane whose handlers calls this method. Alternatively, you could have a custom button on the ribbon that calls a FunctionFile that calls this method.
If you want to display any web site to the user as a result of the button click or some action on the pane, try doing window.open('https://yoursite.com'). This should work if the domain is whitelisted in your manifest. For example:
function redirectFunction() {
window.open("https://othersite.com")
//window.location.href = "https://othersite.com";
}
We are currently using MAPI to load contact information into a form.
Within a MapiSession we are creating a RDOAddressEntry "recepient" with this bit of code
using (MapiSession session = new MapiSession())
{
//open outlook contact dialog
RDOAddressEntry recipient = session.GetAddressEntryFromID(contact.EntryId);
if (recipient.Type == null)
{
throw new ArgumentException("type not defined");
}
recipient.Details(handle.ToInt32());
}
Our problem seems to be that the dialog that opens with the last line of code creates two different dialogs. One for exchange contacts and another one for SMTP contacts.
In the last version of our application it was always opening the same dialog for both RDOAddressEntry-types and we did NOT change anything in our code...
Can you help me fix this issue so that both SMTP and exchange will bring the same dialogs again?
I am not sure why you were getting the same dialog for both before - the dialog is actually provided by the particular address book provider, so it will be different for the entries from different providers.
I'm trying to add a timeout Dialog using proactiveMessages. If user doesn't reply to [A dialog], [timeout dialog] comes out. So I think timeout dialog should be the current dialog. But do I to close other dialog [A dialog]?
According this, it seems context.EndConversation was not working in MS Teams. Of course I have tried again. It is still not working.
I also tried the way below. But it seems not working either.
using (var scope = DialogModule.BeginLifetimeScope(Conversation.Container, context.Activity.AsMessageActivity()))
{
var botData = scope.Resolve<IBotData>();
await botData.LoadAsync(default(CancellationToken));
var stack = scope.Resolve<IDialogStack>();
stack.Reset();
await botData.FlushAsync(default(CancellationToken));
}
Any suggestions about changing the dialog?
There are two methods of redirecting dialog flow within a C# bot.
you can use context.Forward() to send a user to a new dialog starting with a message that you are currently processing:
await context.Forward(new NewOrderDialog(), this.ResumeAfterNewOrderDialog, message, CancellationToken.None);
or you can use context.call() to send a user to a new dialog and start from scratch there:
context.Call(new AgeDialog(this.name), this.AgeDialogResumeAfter);
The "ResumeAfter" functions can be defined anywhere (including a function within the new dialog itself) and setting these to where you would like to redirect the user after they have finished with your timeout dialog will allow you to determine the flow.
I am trying to display a popup message on my web app. When i run my app normally on my local pc, i get the pop up message boxes appear. However when i publish the app they dont.
here's how it will work:
a button is pressed, it will pick up a file from a directory, then it will check another directory to see if the file the exists...if the file exists then a pop up is needed to inform "File already exists. do you want to continue?" if the user clicks yes it carried on with the code, if they click no then the process is ended.
do anyone have any idea how to do this?
my code so far:
If System.IO.File.Exists(acceptedExistsuNKNOWN) And System.IO.File.Exists(rejectedExistsUNKNOWN) Then
'IF BOTH EXIST
If MsgBox(acceptedExistsuNKNOWN & " & " & rejectedExistsUNKNOWN & "files already exists, do you want to rerun the process?", MsgBoxStyle.YesNo, "Files Exists") = MsgBoxResult.Yes Then
(continur
else
System.Diagnostics.Process.GetCurrentProcess.Kill()...
many thanks
The problem with your idea is that someone would need to sit logged in to the server to interact with the modal popup boxes; that is, if this was even possible, since it would need to be that person on the server who does the action on the page in order to be the recipient of the popup, so it's not like other users can issue a popup to him.
What you do on the server side executes on the server side.
I think you really want ti to show on the client side, but want the logic to make it happen on the server side. It doesn't work this way. Instead, what you might do is output something n the response that indicates a client-side popup should be shown. For instance, you could have a hidden field on the page and set a value, then use JavaScript to show an alert if that value meets your criteria.
Think about what you are asking. If a dialog pops on the server side, the user will not be able to see it (they are on the client side). Moreover, the code will be at a standstill until someone dismisses that dialog, which the user cant see. Only individuals with access to the server will be able to see this. Do you intend to have someone watching the server 24/7? Instead, you probably want to alert the user. This can be done my returning a response from the server code to the client code to display a dialog. The simplest method would be to throw an error and redirect the user to a new page to display an error. If you want something more fluid, you can use updated panels and the AjaxControlToolkit's modal pop up extender. Another way would be to use ClientScript, like this:
try
{
//check for files here
}
catch (Exception ex)
{
string script = "<script>alert('" + ex.Message + "');</script>";
if (!Page.IsStartupScriptRegistered("myErrorScript"))
{
Page.ClientScript.RegisterStartupScript("myErrorScript", script);
}
}
I'm making an app and I want to be able to go from my app to the messaging app straight to the "Create new" page. Is there a way I can navigate to that page straight from my app?
As Andrew M mentioned, the SmsComposeTask is the correct control to use. Here is some sample code for you:
SmsComposeTask smsTask = new SmsComposeTask();
smsTask.To = "0123456789"; // the number you would like to send the sms to
smsTask.Body = "Some prefilled text..."; // if you would like to fill some text
smsTask.Show();
When Show() is called, the app will navigate to the Messaging application and display an SMS filled in with the defined parameters.
Simply use the above code in an event handler (i.e., the event for when a button is clicked), and the user will be navigated accordingly.
Use the SMSComposeTask:
http://www.nickharris.net/2010/09/how-to-sms-using-the-smscomposetask-for-windows-phone-7/