alttester / alttester/AltTester-Unity-SDK

Inconsistent exception thrown by WaitForComponentProperty for non-existent property

Aperta
#1,855 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
2.2.6
Lingua principale
C#
Stelle
121
Fork
24
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### 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)
```

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.