Data Driven Selenium with TFS

111 views Asked by At

I am trying to get Selenium to be Data Driven with Microsoft TFS. I understand Selenium IDE but from what I've researched Selenium IDE cannot be used with a data driven format. What I'm trying to have the data driven section do is cycle through the repositories and add different TFS team and permissions to them. I can set up what I want in Selenium IDE but have no idea how to make it data driven with an excel sheet. Here is my HTML Source Code

<?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="http://MyTFS/" />
<title>DragAndDropPrologue</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">DragAndDropPrologue</td></tr>
</thead><tbody>
<tr>
    <td>open</td>
    <td>/tfs/DefaultCollection/XO/_build</td>
    <td></td>
</tr>
<tr>
    <td>pause</td>
    <td>6000</td>
    <td>6000</td>
</tr>
<tr>
    <td>clickAndWait</td>
    <td>//label[text()=&quot;Repo1;]/</td>
    <td></td>
</tr>
<tr>
    <td>pause</td>
    <td>1000</td>
    <td>1000</td>
</tr>
<tr>
    <td>click</td>
    <td>link=Edit</td>
    <td></td>
</tr>
<tr>
    <td>pause</td>
    <td>1000</td>
    <td>1000</td>
</tr>
<tr>
    <td>click</td>
    <td>xpath=//span[text()='Add build step...']</td>
    <td></td>
</tr>
<tr>
    <td>pause</td>
    <td>1000</td>
    <td>1000</td>
</tr>
<tr>
    <td>click</td>
    <td>xpath=(//button[@value='Add'])[11]</td>
    <td></td>
</tr>
<tr>
    <td>click</td>
    <td>xpath=(//button[@value='Add'])[12]</td>
    <td></td>
</tr>
<tr>
    <td>click</td>
    <td>id=ok</td>
    <td></td>
</tr>
<tr>
    <td>dragAndDropToObject</td>
    <td>//div[text()=&quot;Fetch the Quality Profile from SonarQube&quot;]/</td>
    <td>//div[text()=&quot;Ant&quot;]/</td>
</tr>
<tr>
    <td>pause</td>
    <td>1000</td>
    <td>1000</td>
</tr>
<tr>
    <td>type</td>
    <td>css=div.wrap &gt; input[type=&quot;text&quot;]</td>
    <td>Sonar</td>
</tr>
<tr>
    <td>type</td>
    <td>id=projectKey</td>
    <td>test</td>
</tr>
<tr>
    <td>type</td>
    <td>id=projectName</td>
    <td>test</td>
</tr>
<tr>
    <td>dragAndDropToObject</td>
    <td>//div[text()=&quot;SonarQube for MSBuild - End Analysis&quot;]/</td>
    <td>//div[text()=&quot;Ant&quot;]/</td>
</tr>
<tr>
    <td>click</td>
    <td>xpath=//span[text()='Save']</td>
    <td></td>
</tr>
<tr>
    <td>pause</td>
    <td>1000</td>
    <td>1000</td>
</tr>
<tr>
    <td>click</td>
    <td>id=ok</td>
    <td></td>
</tr>
<tr>
    <td>pause</td>
    <td>1000</td>
    <td>1000</td>
</tr>
<tr>
    <td>clickAndWait</td>
    <td>//label[text()=&quot;Repo2;]/</td>
    <td></td>
</tr>
<tr>
    <td>pause</td>
    <td>1000</td>
    <td>1000</td>
</tr>
<tr>
    <td>click</td>
    <td>link=Edit</td>
    <td></td>
</tr>
<tr>
    <td>pause</td>
    <td>1000</td>
    <td>1000</td>
</tr>
<tr>
    <td>click</td>
    <td>xpath=//span[text()='Add build step...']</td>
    <td></td>
</tr>
<tr>
    <td>pause</td>
    <td>1000</td>
    <td>1000</td>
</tr>
<tr>
    <td>click</td>
    <td>xpath=(//button[@value='Add'])[11]</td>
    <td></td>
</tr>
<tr>
    <td>click</td>
    <td>xpath=(//button[@value='Add'])[12]</td>
    <td></td>
</tr>
<tr>
    <td>click</td>
    <td>id=ok</td>
    <td></td>
</tr>
<tr>
    <td>dragAndDropToObject</td>
    <td>//div[text()=&quot;Fetch the Quality Profile from SonarQube&quot;]/</td>
    <td>//div[text()=&quot;Ant&quot;]/</td>
</tr>
<tr>
    <td>type</td>
    <td>css=div.wrap &gt; input[type=&quot;text&quot;]</td>
    <td>Sonar</td>
</tr>
<tr>
    <td>type</td>
    <td>id=projectKey</td>
    <td>test</td>
</tr>
<tr>
    <td>type</td>
    <td>id=projectName</td>
    <td>test</td>
</tr>
<tr>
    <td>dragAndDropToObject</td>
    <td>//div[text()=&quot;SonarQube for MSBuild - End Analysis&quot;]/</td>
    <td>//div[text()=&quot;Ant&quot;]/</td>
</tr>
<tr>
    <td>click</td>
    <td>xpath=//span[text()='Save']</td>
    <td></td>
</tr>
<tr>
    <td>click</td>
    <td>id=ok</td>
    <td></td>
</tr>
<tr>
    <td>pause</td>
    <td>1000</td>
    <td>1000</td>
</tr>
</tbody></table>
</body>
</html>
0

There are 0 answers