Skip to content

Test Method throws exception: System.NullReferenceException: Object reference not set to an instance of an object. #474

@sammcquistan

Description

@sammcquistan

In this particular test that is being run, I am unable to interact with the "Add a Phone Call" activity in a contacts page. Our developers do not believe this is code that we have written, but the issue has been narrowed down to the element's onclick attribute having an assignment of "return false;". Normally, a click on this element yields the intended result of the dropdown (second image attachment) being expanded; but, using various script actions do not yield this same result. See below attachments:

Contact page overview:
contact page

Add Phone Call tab expanded:
contact page add phone call expanded

Add Phone Call code:
add phone call code

The code used that throws this exception in particular is:
xrmBrowser.Document.getElementByXPath("//*[@id='activityLabelinlineactivitybar4210']").Click();

I have also tried using xrmBrowser.Driver.ExecuteScript to include javascript code to edit the attribute to not have this returnfalse code. How can this element be clicked?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions