I am having an issue with clicking on an OK button in a confirming dialog. This is what I have used but it isn't activating the OK nor is it getting the message property from the dialog. Any ideas as to what is wrong OR better yet, do you have any code that clicks on OK in a confirm dialog?
var confirmHandler = new ConfirmDialogHandler();
using (new UseDialogOnce(newIee.DialogWatcher, confirmHandler))
{
//Click EXIT - CT__Exit
Regex ex = new Regex("CT__Exit");
newIee.Image(Find.ById(ex)).ClickNoWait();
string temp = confirmHandler.Message;
confirmHandler.WaitUntilExists();
Assert.AreEqual(
"Warning! Policy Number or Transaction Type was changed."
+ " Are you sure you want to exit the case?",
confirmHandler.Message);
confirmHandler.OKButton.Click();
}
The script is failing here...confirmHandler.WaitUntilExists();
Related
i am at website https://www.qatestpage.com/page1
after click the 'testlink'
new window https://google.com is opened.
and I want to assert the new window url is correct.
this is my codes:
cy.get('a[href*="testlink"]').eq(0).click()
cy.location().should((loc) => {
expect(loc.href).to.include('https://google.com')
})
error:
Timed out retrying: expected 'https://www.qatestpage.com/page1' to include 'https://google.com'
Cypress doesn't support multiple tabs feature. So when you are saying cy.location(), this always returns you the window where you clicked on testlink. So that is the reason it is giving you this https://www.qatestpage.com/page1 instead of https://google.com
Please refer here https://docs.cypress.io/guides/references/trade-offs.html#Multiple-tabs
Try:
cy.url().then(str1 => {
expect(str1).to.include(str2)
})
where str1 will capture the current url of the window and str2 is the string you want to check if it’s present in str1.
I'm writing a extension package for VS 2019, So far i find out how to get "Recent projects and solutions" items, These items have a PropertyInfo called "Pinned" which means that project or solution is pinned, Except it's always false.
Here is the code which i get project list and show it to user :
IVsDataSourceFactory objFactory = serviceProvider.GetService(typeof(SVsDataSourceFactory)) as IVsDataSourceFactory;
objFactory.GetDataSource(new Guid("9099ad98-3136-4aca-a9ac-7eeeaee51dca"), 1, out IVsUIDataSource dataSource);
Type typProjectMruList = Type.GetType("Microsoft.VisualStudio.PlatformUI.ProjectMruList, Microsoft.VisualStudio.Shell.UI.Internal", true);
System.Reflection.PropertyInfo itemsProperty = typProjectMruList.GetProperty("Items");
Type typFileSystemMruItem = Type.GetType("Microsoft.VisualStudio.PlatformUI.FileSystemMruItem, Microsoft.VisualStudio.Shell.UI.Internal", true);
System.Reflection.PropertyInfo pathProperty = typFileSystemMruItem.GetProperty("Path");
System.Reflection.PropertyInfo pinnedProperty = typFileSystemMruItem.GetProperty("Pinned");
IList lstItems = (IList)itemsProperty.GetValue(dataSource, null);
string strMsg = "";
for (var i = lstItems.Count - 1; i > -1; i--)
{
string strPath = (string)pathProperty.GetValue(lstItems[i], null);
bool blnPinned = (bool)pinnedProperty.GetValue(lstItems[i], null);
strMsg = strMsg + "Path : " + strPath + Environment.NewLine + "Pinned : " + blnPinned.ToString() + Environment.NewLine + Environment.NewLine;
}
// Show a message box to prove we were here
VsShellUtilities.ShowMessageBox(
package,
strMsg,
"",
OLEMSGICON.OLEMSGICON_INFO,
OLEMSGBUTTON.OLEMSGBUTTON_OK,
OLEMSGDEFBUTTON.OLEMSGDEFBUTTON_FIRST);
Anyone tried to do something like this before? Or this is a bug and i should report it to microsoft?
If you want to test this code just create a new command and put this code in "Execute" void.
Anyone tried to do something like this before? Or this is a bug and i
should report it to microsoft?
Based on your description, when I try your code and when I debug this project, create a new project in solution explorer, I faced the same issue as you said: the value of blnPinned is always false though the project is pinned.
So l have reported this issue on our DC Forum for you. See this link which I hope anyone who is interested in this issue will vote for you.
You can vote on this issue and add any comment if I forgot some detailed info to attract more attention. With this further step, I hope the staff will give a satisfactory feedback.
I am launching an app and then trying to generate a key event say "HOME". If I call a sleep function after generating the event. The APIs don't generate the events. Without sleep it works properly.
pAc = AppManager::FindAppControlN(appId,operationId);
AppLog(GetErrorMessage(GetLastResult()));
if(pAc)
{
AppLog("Launching Applicaiton");
result r = pAc->Start(&URI,&MIME,null,null);
AppLog(GetErrorMessage(r));
delete pAc;
}
AppLog("Home Key Generated");
SystemUtil::GenerateKeyEvent(KEY_EVENT_TYPE_PRESSED,KEY_HOME);
AppLog(GetErrorMessage(GetLastResult()));
SystemUtil::GenerateKeyEvent(KEY_EVENT_TYPE_RELEASED,KEY_HOME);
AppLog(GetErrorMessage(GetLastResult()));
sleep(2);
All AppLogs display E_SUCCESS, but still events are not generated. Can somebody help as to what is wrong here?
how do unity check if player manually sign out from the leaderboard in google play service. I am using the GPG plugin for this and my platform is in android
This is a bit dated, but I was just looking into this and thought I'd share what I found.
When you sign out from within the leaderboard (or achievements page), the GPG plugin gives you an error that looks like this:
** [Play Games Plugin DLL] ERROR: Authentication has been lost!
which causes PlayGamesPlatform.Instance.IsAuthenticated () to return false.
One way to find catch this is simply listening to the script that is displaying the message. Their log function is written below. Just look at the msg arg and toggle your variable you are using to keep track of the logged in state.
- GooglePlayGames > OurUtils > Logger.cs
...
public static void e(string msg) {
Debug.LogWarning("*** " + LOG_PREF + " ERROR: " + msg);
if (msg == "Authentication has been lost!") {
// yourScript.isLoggedIn = false;
}
}
...
Alternatively, you could check the value of PlayGamesPlatform.Instance.IsAuthenticated() when the user attempts to access one of the GPG services (leaderboard, achievements, etc). If it is false, the user is not signed in and should be prompted to sign in rather than firing the service.
Hey I am working on a password changer. User logs in ( successfully), loads a global var with user initials, then launch a password expired form. I try and use those initials on the password expired form to retrieve user info from DB.
vaUserLog.FieldValue("USERINIT") = UserInitials
vaUserLog.GetEqual
vaStat = vaUserLog.Status
vaStat keeps giving me an error of 4. I am using pervasive v9. Connection with VA looks like:
With vaUserLog
.RefreshLocations = True
.DdfPath = DataPath
.TableName = "USERLOG"
.Location = "USERLOG.MKD"
.Open
If .Status <> 0 Then
ErrMsg = "Error Opening File " + .TableName + " - Status " + str$(.Status) + vbCrLf + "Contact IT Department"
End If
End With
In DB table, USERINIT is Char, 3. UserInitials is a String.
Probably missing something small but can't think right now. Any help is appreciate. Lemme know if you require more info.
Cheers
Status 4 means that the record could not be found. In your case, it could be the case of the value being searched is wrong, there's a different padding (spaces versus binary zero), or that the UserInitials value just isn't in the data file.
You can use MKDE Tracing to see what's actually being passed to the PSQL engine. Once you've done that, make sure the value you're using works through the Function Executor where you can open the file and perform a GetEqual.
Here are my suggestions:
- Make sure you're pointing to the right data files.
- Make sure you're passing the right value into the GetEqual (by setting the FieldValue).