I am trying to figure out how to select with Xpath something that ends
with 'MWI'
I am getting a null pointer error when I use this. Does anyone have
examples of some working string compare xpaths?
<watij-set-select-list
functionId="Set the 'MWI' option of a select field"
how="xpath"
what="string contains(//SELECT[@name],MWI)"
/>
<watij-set-select-list
functionId="Set the 'MWI' option of a select field"
how="xpath"
what="//SELECT[contains(@name, 'MWI')]"
/>
<select name="server_name" size="10" style="width: 300px;">
<option value='10022' selected>
pstn3 - MWI
.../>
So I want to select the name elements childs char data? Is there
something for that?
thanks again,
./b
For example;
<watij-set-select-list
functionId="Set the 'MWI' option of a select field"
how="xpath"
what="SELECT//OPTION[contains(text, 'MWI')]"
/>
Still re-reading the xpath tutorial: http://www.w3schools.com/xpath/xpath_syntax.asp
Any further help would be greatly appreciated.
On Jun 5, 10:14 am, "Christian Hargraves" <engr...@gmail.com> wrote:
Not only can I not select this item from a select list, im having
trouble clicking a button. There is a null pointer error here too.
watij
ie().button(getSymbolFromString(how),what).click();
html
<input type="submit" name="apply" value=" run "
class="buttonLabel">
error
java.lang.NullPointerException
at
net.sf.jameleon.plugin.watij.WatijFunctionTag.store(WatijFunctionTag.java:
103)
at
net.sf.jameleon.util.StateStorer.storeState(StateStorer.java:205)
at
net.sf.jameleon.util.StateStorer.eventOccured(StateStorer.java:129)
at net.sf.jameleon.function.FunctionTag.doTag(FunctionTag.java:
292)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:
262)
at
org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at
org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186)
at net.sf.jameleon.SessionTag.doTag(SessionTag.java:191)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:
262)
at
org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at
org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186)
at net.sf.jameleon.TestCaseTag.invokeChildren(TestCaseTag.java:
643)
at net.sf.jameleon.TestCaseTag$1.run(TestCaseTag.java:843)
at net.sf.jameleon.TestCaseTag.executeBody(TestCaseTag.java:
896)
at net.sf.jameleon.TestCaseTag.executeNoCSV(TestCaseTag.java:
841)
at net.sf.jameleon.TestCaseTag.doTag(TestCaseTag.java:789)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:
262)
at
org.apache.commons.jelly.JellyContext.runScript(JellyContext.java:706)
at
org.apache.commons.jelly.JellyContext.runScript(JellyContext.java:670)
at
org.apache.commons.jelly.JellyContext.runScript(JellyContext.java:579)
at
net.sf.jameleon.ExecuteTestCase.runScript(ExecuteTestCase.java:302)
at net.sf.jameleon.ui.TestCasePane$ExecuteButtonAction
$2.run(TestCasePane.java:293)
On Jun 5, 10:14 am, "Christian Hargraves" <engr...@gmail.com> wrote:
1) you aren't telling it what to set. Take a look at the acceptance
tests in watij-plugin/tst/xml/acceptance/watij-set-select-list-
success.xml
2) I don't see any reason for using XPath in this situation. You know
the field name so use:
<watij-set-select-list
functionId="Set the 'MWI' option of a select field"
how="name"
what="server_name"
select="pstn3 - MWI"
/>
or
<watij-set-select-list
functionId="Set the 'MWI' option of a select field"
how="name"
what="server_name"
selectValue="10022"
/>
Try:
ie().button(how,what).click();
On Jun 5, 7:33 pm, b1alpha <b.1.al...@gmail.com> wrote:
./b
what="//SELECT/OPTION[contains(text(), 'MWI')]"