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

Selection of Review form after case creation #50

Closed
kishantt opened this issue Nov 24, 2017 · 4 comments
Closed

Selection of Review form after case creation #50

kishantt opened this issue Nov 24, 2017 · 4 comments

Comments

@kishantt
Copy link

Hi Everyone,

Not able to create the review form after creation of Case form in service module:
XrmBrowser.Entity.SelectForm("Review", PreThinkTime(7000)) is not working

Steps:

  1. Go to Case
  2. Select new case
  3. Select create form
    'XrmBrowser.Entity.SelectForm("Create", PreThinkTime(7000))
  4. Save the case form
  5. Try to select Review form
    'XrmBrowser.Entity.SelectForm("Review", PreThinkTime(7000))
    Here not selecting the Review form.

How to select Review form after case creation?

Thanks in advance!

@dtu11
Copy link
Member

dtu11 commented Dec 4, 2017

Can you please provide the code for your test and we'll try to repro the issue?

Thanks

@kishantt
Copy link
Author

kishantt commented Dec 5, 2017

Thanks for reply.
Below are the code snippets which we have used to select the Review form after creation of case.

  1. Creating the new case
    public override bool Execute(XrmBrowser xrmBrowser)
    {
    string Command = "New case"
    xrmBrowser.CommandBar.ClickCommand(Command);
    xrmBrowser.ThinkTime(PostThinkTime(1000));
    return true;
    }

  2. Creating the form
    //It is working fine here
    public override bool Execute(XrmBrowser xrmBrowser)
    {
    string Form = "Create";
    xrmBrowser.Entity.SelectForm(Form, PreThinkTime(7000));
    xrmBrowser.ThinkTime(PostThinkTime(0));
    return true;
    }

  3. Saving the case
    public override bool Execute(XrmBrowser xrmBrowser)
    {
    xrmBrowser.Entity.Save(PreThinkTime(2000));
    xrmBrowser.ThinkTime(PostThinkTime(1000));
    return true;
    }

  4. Trying to change the form from Create to Review (used same code as above point number 2, only string value Form has changed to Review)
    //IT IS NOT WORKING i.e. not opening the dropdown (xpath of dropdown is '{ "Entity_SelectForm", "id("formselectorcontainer")"}')
    public override bool Execute(XrmBrowser xrmBrowser)
    {
    string Form = "Review";
    xrmBrowser.Entity.SelectForm(Form, PreThinkTime(7000));
    xrmBrowser.ThinkTime(PostThinkTime(0));
    return true;
    }

Please let us know if you need any information.

-Thanks

@j621z
Copy link
Member

j621z commented Dec 7, 2017

@kishantt Please try using the following code, which is working as expected. My instance does not have a "Create" or "Review" form sections. My form sections are "Summary" and I used "Social Details" respectively. However, it's working as expected and I'm using version 8.2. What version are you using?

The XPath to the flyout form section container: //*[@id="flyoutFormSection_Container"]

        using (var xrmBrowser = new XrmBrowser(TestSettings.Options))
        {
            xrmBrowser.LoginPage.Login(_xrmUri, _username, _password);
            xrmBrowser.GuidedHelp.CloseGuidedHelp();

            xrmBrowser.ThinkTime(500);
            xrmBrowser.Navigation.OpenSubArea("Service", "Cases");

            string Command = "New case";
            xrmBrowser.CommandBar.ClickCommand(Command);
            xrmBrowser.ThinkTime(1000);

            string Form = "Summary";
            xrmBrowser.Entity.SelectForm(Form, 1000);
            

            xrmBrowser.Entity.SetValue("title", "TestReviewForm");
            xrmBrowser.Entity.SelectLookup("customerid", 0);
            xrmBrowser.Entity.Save(2000);

            xrmBrowser.Entity.SelectForm("Social Details", 1000);
        }

@j621z
Copy link
Member

j621z commented Dec 18, 2017

@kishantt closing issue. Please open new issue if code provided above doesn't resolve the issue for you. Thank you.

@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

3 participants