XPath is Dynamic in the Application using Appium Inspector
up vote
0
down vote
favorite
i have attached the screen shot of the selected Element
I am working on Mobile App Testing for iPhone, I am using Appium inspector to identify the elements, I have a scenario where bot replies a text while chatting with the Bot, so I need to identify the text first, for that I have only xpath, and that keeps changing, Apart from xpath I have attributes type
, enabled
, visible
, x
, y
, height
, width
, can you please tell how to identify the text first using the attributes I mentioned?
public void verify_validatation_message() {
MobileElement message = (MobileElement) driver.findElementByXPath("//XCUIElementTypeOther[@name="label_2"])[62]/XCUIElementTypeOther");
String validation_message = message.getText();
Assert.assertEquals("I can see you've put a term of 45 years", validation_message);
}
ScreenShot of Selected Element Continuation
appium appium-ios
New contributor
sai dayapule is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
up vote
0
down vote
favorite
i have attached the screen shot of the selected Element
I am working on Mobile App Testing for iPhone, I am using Appium inspector to identify the elements, I have a scenario where bot replies a text while chatting with the Bot, so I need to identify the text first, for that I have only xpath, and that keeps changing, Apart from xpath I have attributes type
, enabled
, visible
, x
, y
, height
, width
, can you please tell how to identify the text first using the attributes I mentioned?
public void verify_validatation_message() {
MobileElement message = (MobileElement) driver.findElementByXPath("//XCUIElementTypeOther[@name="label_2"])[62]/XCUIElementTypeOther");
String validation_message = message.getText();
Assert.assertEquals("I can see you've put a term of 45 years", validation_message);
}
ScreenShot of Selected Element Continuation
appium appium-ios
New contributor
sai dayapule is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Can you show us what you have tried? Please edit your question with relevant code.
– Mr.Turtle
2 days ago
public void verify_validatation_message() { MobileElement message = (MobileElement) driver.findElementByXPath("//XCUIElementTypeOther[@name="label_2"])[62]/XCUIElementTypeOther"); String validation_message = message.getText(); Assert.assertEquals("I can see you've put a term of 45 years", validation_message); }
– sai dayapule
2 days ago
This is the code i have written, But the xpath is Dynamic and keeps changing, i have other attributes like type, enable,visible,x,y,height, width.
– sai dayapule
2 days ago
@saidayapule - Can you share screen shot of element inspection ?
– Amit Jain
2 days ago
@AmitJain i have added the screenshots
– sai dayapule
2 days ago
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
i have attached the screen shot of the selected Element
I am working on Mobile App Testing for iPhone, I am using Appium inspector to identify the elements, I have a scenario where bot replies a text while chatting with the Bot, so I need to identify the text first, for that I have only xpath, and that keeps changing, Apart from xpath I have attributes type
, enabled
, visible
, x
, y
, height
, width
, can you please tell how to identify the text first using the attributes I mentioned?
public void verify_validatation_message() {
MobileElement message = (MobileElement) driver.findElementByXPath("//XCUIElementTypeOther[@name="label_2"])[62]/XCUIElementTypeOther");
String validation_message = message.getText();
Assert.assertEquals("I can see you've put a term of 45 years", validation_message);
}
ScreenShot of Selected Element Continuation
appium appium-ios
New contributor
sai dayapule is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
i have attached the screen shot of the selected Element
I am working on Mobile App Testing for iPhone, I am using Appium inspector to identify the elements, I have a scenario where bot replies a text while chatting with the Bot, so I need to identify the text first, for that I have only xpath, and that keeps changing, Apart from xpath I have attributes type
, enabled
, visible
, x
, y
, height
, width
, can you please tell how to identify the text first using the attributes I mentioned?
public void verify_validatation_message() {
MobileElement message = (MobileElement) driver.findElementByXPath("//XCUIElementTypeOther[@name="label_2"])[62]/XCUIElementTypeOther");
String validation_message = message.getText();
Assert.assertEquals("I can see you've put a term of 45 years", validation_message);
}
ScreenShot of Selected Element Continuation
appium appium-ios
appium appium-ios
New contributor
sai dayapule is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
sai dayapule is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited yesterday


Wasiq Bhamla
46939
46939
New contributor
sai dayapule is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 2 days ago


sai dayapule
12
12
New contributor
sai dayapule is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
sai dayapule is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
sai dayapule is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Can you show us what you have tried? Please edit your question with relevant code.
– Mr.Turtle
2 days ago
public void verify_validatation_message() { MobileElement message = (MobileElement) driver.findElementByXPath("//XCUIElementTypeOther[@name="label_2"])[62]/XCUIElementTypeOther"); String validation_message = message.getText(); Assert.assertEquals("I can see you've put a term of 45 years", validation_message); }
– sai dayapule
2 days ago
This is the code i have written, But the xpath is Dynamic and keeps changing, i have other attributes like type, enable,visible,x,y,height, width.
– sai dayapule
2 days ago
@saidayapule - Can you share screen shot of element inspection ?
– Amit Jain
2 days ago
@AmitJain i have added the screenshots
– sai dayapule
2 days ago
add a comment |
Can you show us what you have tried? Please edit your question with relevant code.
– Mr.Turtle
2 days ago
public void verify_validatation_message() { MobileElement message = (MobileElement) driver.findElementByXPath("//XCUIElementTypeOther[@name="label_2"])[62]/XCUIElementTypeOther"); String validation_message = message.getText(); Assert.assertEquals("I can see you've put a term of 45 years", validation_message); }
– sai dayapule
2 days ago
This is the code i have written, But the xpath is Dynamic and keeps changing, i have other attributes like type, enable,visible,x,y,height, width.
– sai dayapule
2 days ago
@saidayapule - Can you share screen shot of element inspection ?
– Amit Jain
2 days ago
@AmitJain i have added the screenshots
– sai dayapule
2 days ago
Can you show us what you have tried? Please edit your question with relevant code.
– Mr.Turtle
2 days ago
Can you show us what you have tried? Please edit your question with relevant code.
– Mr.Turtle
2 days ago
public void verify_validatation_message() { MobileElement message = (MobileElement) driver.findElementByXPath("//XCUIElementTypeOther[@name="label_2"])[62]/XCUIElementTypeOther"); String validation_message = message.getText(); Assert.assertEquals("I can see you've put a term of 45 years", validation_message); }
– sai dayapule
2 days ago
public void verify_validatation_message() { MobileElement message = (MobileElement) driver.findElementByXPath("//XCUIElementTypeOther[@name="label_2"])[62]/XCUIElementTypeOther"); String validation_message = message.getText(); Assert.assertEquals("I can see you've put a term of 45 years", validation_message); }
– sai dayapule
2 days ago
This is the code i have written, But the xpath is Dynamic and keeps changing, i have other attributes like type, enable,visible,x,y,height, width.
– sai dayapule
2 days ago
This is the code i have written, But the xpath is Dynamic and keeps changing, i have other attributes like type, enable,visible,x,y,height, width.
– sai dayapule
2 days ago
@saidayapule - Can you share screen shot of element inspection ?
– Amit Jain
2 days ago
@saidayapule - Can you share screen shot of element inspection ?
– Amit Jain
2 days ago
@AmitJain i have added the screenshots
– sai dayapule
2 days ago
@AmitJain i have added the screenshots
– sai dayapule
2 days ago
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
sai dayapule is a new contributor. Be nice, and check out our Code of Conduct.
sai dayapule is a new contributor. Be nice, and check out our Code of Conduct.
sai dayapule is a new contributor. Be nice, and check out our Code of Conduct.
sai dayapule is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53373058%2fxpath-is-dynamic-in-the-application-using-appium-inspector%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Can you show us what you have tried? Please edit your question with relevant code.
– Mr.Turtle
2 days ago
public void verify_validatation_message() { MobileElement message = (MobileElement) driver.findElementByXPath("//XCUIElementTypeOther[@name="label_2"])[62]/XCUIElementTypeOther"); String validation_message = message.getText(); Assert.assertEquals("I can see you've put a term of 45 years", validation_message); }
– sai dayapule
2 days ago
This is the code i have written, But the xpath is Dynamic and keeps changing, i have other attributes like type, enable,visible,x,y,height, width.
– sai dayapule
2 days ago
@saidayapule - Can you share screen shot of element inspection ?
– Amit Jain
2 days ago
@AmitJain i have added the screenshots
– sai dayapule
2 days ago