alttester / alttester/AltTester-Unity-SDK

Inconsistent exception thrown by WaitForComponentProperty for non-existent property

Aberta
#1,855 0 comentários 0 reações 0 responsáveis Ver no GitHub
2.2.6
Linguagem predominante
C#
Estrelas
121
Forks
24
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

### Summary
When calling `WaitForComponentProperty` with a non-existent property name, the exception thrown is inconsistent between language bindings:

- **.NET and Java:** Throws `PropertyNotFoundException` as expected.
- **Python:** Throws `WaitTimeOutException` instead of `PropertyNotFoundException`.

#### Example code:

.NET:
```csharp
try
{
altElement.WaitForComponentProperty(componentName, unexistingPropertyName, propertyValue, assemblyName);
Assert.Fail();
}
catch (PropertyNotFoundException exception)
{
Assert.That(exception.Message, Is.EqualTo($"Property {unexistingPropertyName} not found"));
}
```

Python:
```python
with pytest.raises(exceptions.WaitTimeOutException) as exception:
alt_element.wait_for_component_property(
component_name, unexisting_property_name, property_value, assembly_name, timeout=2)

assert "Property " + unexisting_property_name + " not found" in str(exception.value)
```

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.