Mandy
1
Hi,
I’m new to Automation Testing tools, I have few queries,
- Can we change the Object properties?
We have a object and its properties are as below
x = 500, y = 408, width = 608 and Height = 80.
Want to write a script that changes X value in the multiples of 5.
- Do we have any Builtin Mobile Keyword that can help me with drag and drop at a point ( Like a Slider).???
Consider a slider Similar to increase Volume up/down.
Hi Mandy,
- You can definitely change Test Object properties programmatically:
Add these imports to the top of your test file:
import com.kms.katalon.core.testobject.TestObject
import com.kms.katalon.core.testobject.ConditionType
In your test:
int x = 500
TestObject myObject = new TestObject("My Object")
// Loop this bit:
myObject = myObject.addProperty("x", ConditionType.EQUALS, x * 5)
- You can check out the setSliderValue() function:
https://api-docs.katalon.com/studio/v5.0/api/com/kms/katalon/core/mobile/keyword/MobileBuiltInKeywords.html#setSliderValue(TestObject,%20java.lang.Number,%20int,%20com.kms.katalon.core.model.FailureHandling)
Hope this helps,
Chris
1 Like