[Solved] Error “Value can’t be null”, UIAutomationElement


It seems that the following line is language sensitive:

Condition condNewTab = new PropertyCondition(AutomationElement.NameProperty, "New Tab");

That is to say that “New Tab” rather than being an internal field is a localised string. This means that this line must be updated to have the correctly localised version of this text.

It is quite possible that there is a better “locate something reliable” that could be used but I am not familiar enough with chrome automation to be able to say if there is and if so what.

solved Error “Value can’t be null”, UIAutomationElement