Giter Club home page Giter Club logo

Comments (6)

dtu11 avatar dtu11 commented on July 20, 2024

What are you trying to do with the framework? Most of the API's are intended to handle all the xpaths for the action you want to do. If there is not currently an API then post the details and we can see about adding the functionality.

If you want to reference an xpath on a custom page then it would look something like this.

xrmBrowser.Driver.FindElement(By.Xpath("id("crmGrid_JumpBar")/tbody/tr/td[1]")).Click();

from easyrepro.

kishantt avatar kishantt commented on July 20, 2024

Thanks for the reply.

It would be more help to me if you would add below xpath in the framework.

I tried below scenario, however not worked:
Trying to click on phone call icon using below Xpaths:
//{ "Nav_PhoneCallPage" , "id("notescontrolactivityContainer_notescontrol")//img[contains(@src,'/_imgs/incoming_call_32.png']"},
//{ "Nav_PhoneCallPage" , "id("notescontrolactivityContainer_notescontrol")//img((@title,'Phone Call Incoming'))"},
//{ "Nav_PhoneCallPage" , "id("notescontrolactivityContainer_notescontrol")/img([@title, 'Phone Call Incoming'])"},
//{ "Nav_PhoneCallPage" , "img("Phone Call Incoming")"},

For more information, please see attached screenshot.
phonecall

  • Thanks

from easyrepro.

kishantt avatar kishantt commented on July 20, 2024

Can you please tell me the xpath of above highlighted (in red color)?

-Thanks

from easyrepro.

dtu11 avatar dtu11 commented on July 20, 2024

To get the xpath for an element just do the following in Chrome.

From Chrome :

  • Right click "inspect" on the item you are trying to find the xpath
  • Right click on the highlighted area on the console.
  • Go to Copy xpath

image

from easyrepro.

kishantt avatar kishantt commented on July 20, 2024

Working as expected with below xpath:
{ "Nav_PhoneCallPage" , "id("notescontrolactivityContainer_notescontrol")/div[4]/div/div/div[2]/div/div/div/div/a/img"}

Hence closing this issue.

  • Thanks

from easyrepro.

prachiwalke avatar prachiwalke commented on July 20, 2024

hi..
please help me in finding an element wit the customized XPath. below is the code:

string brandname = "car_cust" + userData.Brand.ToLower() + userData.CarType.ToLower().Remove(3,4) + "walkin";
string custwalkin_xpath = "//div[@data-id='" + brandname + "']/div/div[2]/div/div/div[2]/div/div[2]/div/input";
IWebElement custwalkin = client.Browser.Driver.FindElement(By.XPath(custwalkin_xpath));

where, the UserDatas are the string which we are fetching from the Excel.
at the line of "IWebElement", i am getting an exception as "Object reference not set to an instance of an object".
I have no option but to customized XPath like this..

Thanks in Advance..

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.