How to get the text (case number) from Web UI



I am trying to get the case number from WebUI using x-path and it is not working

String caseNumber = WebUI.getText(findTestObject(’//table/tbody/tr[1]/td/p[1]/b[2]’))

pls help



Hello, I do not understand your problem. You want to find text within a table which is the casenumber. What s your goal?


As @Marek_Melocik has linked, we need more information. Namely, show us the HTML snippet in question, and exactly which element you are trying to get text from.