Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pending email warning dialog box #57

Closed
maichung77 opened this issue Dec 12, 2017 · 7 comments
Closed

Pending email warning dialog box #57

maichung77 opened this issue Dec 12, 2017 · 7 comments

Comments

@maichung77
Copy link

This is my first time using this tool. What API can I use to close the Pending email warning dialog box that is automatically shown after login? Thanks in advance for your help.

@gohiljayraj
Copy link

Even we are facing the same issue.

@dtu11
Copy link
Member

dtu11 commented Dec 13, 2017

This is an issue we're currently working on. Once the update is made and released, I'll update the Issue here.

Thanks for the feedback

@maichung77
Copy link
Author

Great, thanks for looking into it!

@kaceyarnold
Copy link

Here is what I did to get around the email not sent dialog box.
public static void ADFSLoginAction(LoginRedirectEventArgs obj)
{
IWebElement iframeElement;
IWebDriver Cdriver = obj.Driver;
Cdriver.FindElement(By.Id("passwordInput")).SendKeys(obj.Password.ToUnsecureString());

        //Cdriver.ClickWhenAvailable(By.Id("submitButton"), new TimeSpan(0, 0, 6));
        Cdriver.FindElement(By.Id("submitButton")).Submit();
        Cdriver.FindElement(By.Id("idSIButton9")).Submit();
        Cdriver.WaitForPageToLoad();
        try
        { //Workaround for the email not sent warning dialog in the QA environement.
            iframeElement = Cdriver.FindElement(By.Id("InlineDialog_Iframe"));
        }//close try
        catch (NoSuchElementException) { return; } //If there is no warning dialog we are done
        //TODO: Log presence of warning dialog 
        //Since we have an Iframe switch to it
        Cdriver.SwitchTo().Frame(iframeElement);

        Cdriver.FindElement(By.Id("crmDialogFooter"));
        Cdriver.FindElement(By.XPath("//*[@id=\"crmDialogFooter\"]/div[2]"));
        //Due to issues with the framework click is not handled correctly and throws a no such element error
        // Thus the try catch wrapper.
        try { Cdriver.FindElement(By.XPath("//*[@id=\"butBegin\"]")).Click(); }
        catch (NoSuchElementException)
        { //Log that we closed a dialog window.
        }//close catch for Click action

    }//close Internal ADFS login Action

@gohiljayraj
Copy link

Thanks for your help Kacey Arnold.. Its working for me now. Only concern I have here is if given Xpath or Ids get change in subsequent CRM product patch. We need to keep updating these id's

@kaceyarnold
Copy link

kaceyarnold commented Dec 15, 2017

Yes, but at least you can move forward. Which is what matters? Do what I have taken to doing,
/* ---------------------- This is a hack to get around a bug --------------------------
code
*/ ---------------- End of Hack --------
Now when the fix comes through the hacks are easy to find.
On a side note I thought the email not set up issue was just the nature of tests systems, so I went around it out of habit not even thinking of it as a bug. :)

@j621z
Copy link
Member

j621z commented Dec 18, 2017

This issue has been mitigated and should be pushed to GitHub soon.

@j621z j621z closed this as completed Dec 18, 2017
dtu11 added a commit that referenced this issue Dec 21, 2017
Issue #49
Issue #50
Issue #58
Issue #57
Issue #55
Issue #48
Issue #46
Issue #40
dtu11 added a commit that referenced this issue Dec 21, 2017
Issue #49
Issue #50
Issue #58
Issue #57
Issue #55
Issue #48
Issue #46
Issue #40
dtu11 added a commit that referenced this issue Dec 21, 2017
Issue #49
Issue #50
Issue #58
Issue #57
Issue #55
Issue #48
Issue #46
Issue #40
@dtu11 dtu11 mentioned this issue Dec 21, 2017
dtu11 added a commit that referenced this issue Dec 21, 2017
Issue #49
Issue #50
Issue #58
Issue #57
Issue #55
Issue #48
Issue #46
Issue #40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants