Git Product home page Git Product logo

Comments (6)

j621z avatar j621z commented on May 22, 2024

@khushanki Can you please paste in the stack trace, error message?

from easyrepro.

khushanki avatar khushanki commented on May 22, 2024

Hi,
Please find below error and stack trace:-
System.InvalidOperationException : No view with the name 'Task' exists.'

Stack Trace:-
at Microsoft.Dynamics365.UIAutomation.Api.XrmGridPage.<>c__DisplayClass2_0.b__0(IWebDriver driver)
at Microsoft.Dynamics365.UIAutomation.Browser.DelegateBrowserCommand1.ExecuteCommand(IWebDriver driver, Object[] params) at Microsoft.Dynamics365.UIAutomation.Browser.BrowserCommand1.Execute[T1,T2,T3,T4,T5,T6,T7,T8,T9](IWebDriver driver, T1 p1, T2 p2, T3 p3, T4 p4, T5 p5, T6 p6, T7 p7, T8 p8, T9 p9)
at Microsoft.Dynamics365.UIAutomation.Browser.BrowserCommand1.Execute(IWebDriver driver) at Microsoft.Dynamics365.UIAutomation.Browser.BrowserPage.Execute[TResult](BrowserCommandOptions options, Func2 delegate)
at Microsoft.Dynamics365.UIAutomation.Api.XrmGridPage.SwitchView(String viewName, Int32 thinkTime)
at Medline.Crm.QAAutomation.KeywordToMethod.Test() in D:\Git-SourceCode\Medline.Crm\Medline.Crm.QAAutomation\KeywordToMethod.cs:line 32
at Medline.Crm.QAAutomation.Program.Main(String[] args) in D:\Git-SourceCode\Medline.Crm\Medline.Crm.QAAutomation\Program.cs:line 40

from easyrepro.

khushanki avatar khushanki commented on May 22, 2024

Hi,
I manage to click Task--> My Tasks view using below code:-
xrmBrowser.Driver.FindElement(By.LinkText("My Activities")).SendKeys(Keys.Enter);
xrmBrowser.Driver.FindElement(By.LinkText("Task")).Click();
xrmBrowser.Driver.ClickndWait(By.LinkText("My Tasks"), new TimeSpan(0, 0, 4));

However let me know if any other method I can use like SwitchView .

from easyrepro.

TYLEROL avatar TYLEROL commented on May 22, 2024

Thanks for sharing @khushanki

I have added a feature request to the backlog to expand upon the SwitchView method and add capabilities for Activity entities.

from easyrepro.

TYLEROL avatar TYLEROL commented on May 22, 2024

Closing this as an item is on the backlog tracking this work. We'll update at a later time to confirm this work has been completed.

Thanks,
Tyler

from easyrepro.

hasinthanagodavithana avatar hasinthanagodavithana commented on May 22, 2024

Hi,

In order to this to work in the Activities window, you need to switch the view first. The activity page is construct in an iframe. The filter is in that iframe and you need to change the driver focus the iframe first then you can identify the elements.

Try below code:

            xrmBrowser.Driver.SwitchTo().Frame(xrmBrowser.Driver.FindElement(By.Id("contentIFrame0")));

            xrmBrowser.Driver.FindElement(By.LinkText("My Activities")).SendKeys(Keys.Enter);
            xrmBrowser.Driver.FindElement(By.LinkText("All Activities")).Click();
            xrmBrowser.Driver.ClickndWait(By.LinkText("All Activities Created in Current Year"), new TimeSpan(0, 0, 4));

Regards,
Hasi

from easyrepro.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.