Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

At least some widgets/elements do not work with Selenium IDE #7

Closed
jk-1 opened this issue May 16, 2017 · 2 comments
Closed

At least some widgets/elements do not work with Selenium IDE #7

jk-1 opened this issue May 16, 2017 · 2 comments

Comments

@jk-1
Copy link

jk-1 commented May 16, 2017

I was trying to run scalajs-bootstrap demo https://karasiq.github.io/scalajs-bootstrap/ using Selenium IDE firefox add-on (http://www.seleniumhq.org/projects/ide/)

I started Selenium IDE recording and tried various things with the demo. Then I stopped recording and tried to rerun the recorded macro step by step.

Buttons and links seem to work same way when comparing original recording run and macro step by step rerun.
Text inputs, radio buttons, list selections (plain selection, multiple selection in demo) do not work as they shoud when running macro step by step.

From another app using scalajs-bootstrap I also noticed that password fields and email fields also do not work when running the macro. In this app during the record phase oninput event is fired but during macro rerun oninput event is not fired for some reason although the text changed on the input field also when running macro. onchange event is fired in both cases (recording / macro run).

Is this problem in scalajs-bootstrap or in Selenium IDE?

Here are couple of macros I recorded with Selenium IDE:

  • ToDo button macro
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="https://karasiq.github.io/" />
<title>New Test</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">New Test</td></tr>
</thead><tbody>
<tr>
	<td>open</td>
	<td>/scalajs-bootstrap/</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>css=span.glyphicon.glyphicon-plus</td>
	<td></td>
</tr>
<tr>
	<td>type</td>
	<td>id=bs-auto-a397c7bb-ce0c-490f-b0d2-d48da41478d5</td>
	<td>a</td>
</tr>
<tr>
	<td>click</td>
	<td>css=button.btn.btn-primary</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>css=span.glyphicon.glyphicon-plus</td>
	<td></td>
</tr>
<tr>
	<td>type</td>
	<td>id=bs-auto-c6982873-408e-4bcc-84ff-795f3828d839</td>
	<td>b</td>
</tr>
<tr>
	<td>select</td>
	<td>id=bs-auto-56f4009c-06ad-4080-aa68-8920c75098b9-form-select-input</td>
	<td>label=High</td>
</tr>
<tr>
	<td>click</td>
	<td>css=div.modal-footer &gt; button.btn.btn-primary</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>css=span.glyphicon.glyphicon-plus</td>
	<td></td>
</tr>
<tr>
	<td>type</td>
	<td>id=bs-auto-00e8704f-cb43-407a-9276-e88c1842ee36</td>
	<td>c</td>
</tr>
<tr>
	<td>select</td>
	<td>id=bs-auto-4be00929-55f3-459a-840f-5d1e8f3a3abb-form-select-input</td>
	<td>label=Low</td>
</tr>
<tr>
	<td>click</td>
	<td>css=div.modal-footer &gt; button.btn.btn-primary</td>
	<td></td>
</tr>

</tbody></table>
</body>
</html>

  • Buttons macro
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="https://karasiq.github.io/" />
<title>New Test</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">New Test</td></tr>
</thead><tbody>
<tr>
	<td>open</td>
	<td>/scalajs-bootstrap/</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>link=Buttons</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>css=button.btn.btn-success</td>
	<td></td>
</tr>
<tr>
	<td>type</td>
	<td>id=bs-auto-956922b1-7c2a-4e7f-aa83-b7d6ca44b056</td>
	<td>100</td>
</tr>
<tr>
	<td>click</td>
	<td>id=bs-auto-56e850a5-ae11-49a7-9d8a-0775043625f6</td>
	<td></td>
</tr>
<tr>
	<td>select</td>
	<td>id=bs-auto-db5565a4-a280-40bd-a42e-ba244f5e17e5-form-select-input</td>
	<td>label=Option 3</td>
</tr>
<tr>
	<td>addSelection</td>
	<td>id=bs-auto-5aec1164-7576-4127-b244-8f033d310d36-form-select-input</td>
	<td>label=Option 3</td>
</tr>
<tr>
	<td>type</td>
	<td>id=bs-auto-e06a1eba-b111-49d4-afa7-3f3950ff2fb0-form-textarea-input</td>
	<td>aaa</td>
</tr>
<tr>
	<td>click</td>
	<td>css=button.btn.btn-primary</td>
	<td></td>
</tr>

</tbody></table>
</body>
</html>

@jk-1
Copy link
Author

jk-1 commented May 17, 2017

This might be a problem with the Selenium IDE, because it cannot playback correctly simple w3schools demo. I filed this: SeleniumHQ/selenium#4032

@Karasiq
Copy link
Owner

Karasiq commented Jul 27, 2017

id=bs-auto-a397c7bb-ce0c-490f-b0d2-d48da41478d5

Looks like Selenium uses auto-generated id, which are always unique.

@Karasiq Karasiq closed this as completed Nov 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants