0% found this document useful (0 votes)
3 views5 pages

JMeter WebDriver Test Plan XML

The document is a JMeter test plan configured to perform automated testing using a Chrome WebDriver. It includes a thread group with a single thread and a series of scripted actions to interact with a web application, including logging in and adding a user. Additionally, it contains a result collector for summarizing the test outcomes.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views5 pages

JMeter WebDriver Test Plan XML

The document is a JMeter test plan configured to perform automated testing using a Chrome WebDriver. It includes a thread group with a single thread and a series of scripted actions to interact with a web application, including logging in and adding a user. Additionally, it contains a result collector for summarizing the test outcomes.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

<?xml version="1.0" encoding="UTF-8"?

>
<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.6.3">
<hashTree>
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan">
<elementProp name="TestPlan.user_defined_variables" elementType="Arguments"
guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables">
<collectionProp name="[Link]"/>
</elementProp>
<boolProp name="TestPlan.functional_mode">false</boolProp>
<boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
</TestPlan>
<hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup"
testname="Thread Group">
<intProp name="ThreadGroup.num_threads">1</intProp>
<intProp name="ThreadGroup.ramp_time">1</intProp>
<boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
<elementProp name="ThreadGroup.main_controller"
elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController"
testname="Loop Controller">
<stringProp name="[Link]">1</stringProp>
<boolProp name="LoopController.continue_forever">false</boolProp>
</elementProp>
</ThreadGroup>
<hashTree>
<[Link]
guiclass="[Link]"
testclass="[Link]"
testname="jp@gc - Chrome Driver Config">
<boolProp name="[Link]">false</boolProp>
<boolProp name="WebDriverConfig.reset_per_iteration">true</boolProp>
<stringProp
name="WebDriverConfig.driver_path">C:/Users/Omer/Downloads/chromedriver-win64/
[Link]</stringProp>
<boolProp name="WebDriverConfig.dev_mode">false</boolProp>
<boolProp name="[Link]">false</boolProp>
<boolProp name="WebDriverConfig.maximize_browser">true</boolProp>
<stringProp name="ChromeDriverConfig.additional_args"></stringProp>
<stringProp name="ChromeDriverConfig.binary_path"></stringProp>
<stringProp name="WebDriverConfig.proxy_type">SYSTEM</stringProp>
<stringProp name="WebDriverConfig.proxy_pac_url"></stringProp>
<stringProp name="WebDriverConfig.http_host"></stringProp>
<intProp name="WebDriverConfig.http_port">8080</intProp>
<boolProp
name="WebDriverConfig.use_http_for_all_protocols">true</boolProp>
<stringProp name="WebDriverConfig.https_host"></stringProp>
<intProp name="WebDriverConfig.https_port">8080</intProp>
<boolProp name="WebDriverConfig.use_ftp_proxy">true</boolProp>
<stringProp name="WebDriverConfig.ftp_host"></stringProp>
<intProp name="WebDriverConfig.ftp_port">8080</intProp>
<boolProp name="WebDriverConfig.use_socks_proxy">true</boolProp>
<stringProp name="WebDriverConfig.socks_host"></stringProp>
<intProp name="WebDriverConfig.socks_port">8080</intProp>
<stringProp name="WebDriverConfig.no_proxy">localhost</stringProp>
<stringProp name="WebDriverConfig.custom_capabilites"></stringProp>
</[Link]>
<hashTree/>
<[Link]
guiclass="[Link]"
testclass="[Link]"
testname="jp@gc - WebDriver Sampler">
<stringProp name="[Link]">import [Link]
import [Link]
import [Link]
import [Link]
import [Link]
import [Link]
import [Link]
import [Link]

// Set the path to ChromeDriver


[Link](&quot;[Link]&quot;,
&quot;C:/Users/Omer/Downloads/chromedriver-win64/[Link]&quot;)

// Initialize ChromeDriver
WebDriver driver = new ChromeDriver()

// Implicit Wait (applies globally to all elements)


[Link]().timeouts().implicitlyWait([Link](10))

// Explicit Wait (for specific elements)


WebDriverWait wait = new WebDriverWait(driver, [Link](30))

try {
// Step 1: Open the URL
[Link](&quot;[Link]

// Step 2: Set window size


[Link]().window().setSize(new [Link](1062, 1040))

// Step 3: Click on the button

[Link]([Link]([Link](&quot;button:nth-
child(3)&quot;))).click()

// Step 4: Type email


WebElement emailField =
[Link]([Link]([Link](&quot;email&quot;)))
[Link](&quot;[Link]@[Link]&quot;)

// Step 5: Type password


WebElement passwordField =
[Link]([Link]([Link](&quot;password&quot;
)))
[Link](&quot;EbadAhmed12345&quot;)

// Step 6: Click on the next button

[Link]([Link]([Link](&quot;next&quot;))).click(
)

// Step 7: Select organization from dropdown


WebElement orgSelector =
[Link]([Link]([Link](&quot;organization-
selector&quot;)))
[Link]()
// WebElement orgOption =
[Link]([Link]([Link](&quot;//option[.
= &apos;CHANGSHU DAVID TEXTILE CO.,LTD - 53133&apos;]&quot;)))
// [Link]()

// Step 8: Click on the third option

[Link]([Link]([Link](&quot;option:nth-
child(3)&quot;))).click()

// Step 9: Click on the button

[Link]([Link]([Link](&quot;button:nth-
child(3)&quot;))).click()

// Step 10: Click on the user actions menu


[Link]([Link]([Link](&quot;.user-
actions &gt; .menu-item:nth-child(1)&quot;))).click()

// Step 11: Click on the &quot;Company&quot; link

[Link]([Link]([Link](&quot;Company&quot;)
)).click()
[Link](2000)
// Step 12: Click on the user tab

[Link]([Link]([Link](&quot;userTab&quot;))).cli
ck()

// Step 13: Click on the &quot;Add User&quot; button

[Link]([Link]([Link](&quot;btnAddUser&quot;))).
click()

// Step 14: Click on the first name field


WebElement firstNameField =
[Link]([Link]([Link](&quot;user-first-
name&quot;)))
[Link]()
[Link](&quot;walt&quot;)

// Step 15: Type last name


WebElement lastNameField =
[Link]([Link]([Link](&quot;user-last-
name&quot;)))
[Link](&quot;Mark&quot;)

// Step 16: Select position from dropdown


WebElement positionDropdown =
[Link]([Link]([Link](&quot;user-
position&quot;)))
Select positionSelect = new Select(positionDropdown)
[Link](&quot;Sales&quot;)

// Step 17: Click on the position dropdown option


[Link]([Link]([Link](&quot;#user-
position &gt; option:nth-child(7)&quot;))).click()

// Step 18: Click on the form row


[Link]([Link]([Link](&quot;#divMultiUs
erForm &gt; .row:nth-child(5)&quot;))).click()

// Step 19: Select role from dropdown


WebElement roleDropdown =
[Link]([Link]([Link](&quot;user-role&quot;)))
Select roleSelect = new Select(roleDropdown)
[Link](0) // Select the first option

// Step 20: Click on the email field


WebElement userEmailField =
[Link]([Link]([Link](&quot;user-email&quot;)))
[Link]()
[Link](&quot;walt.markooo987@[Link]&quot;)

// Step 21: Click on the save user button


[Link]([Link]([Link](&quot;save-
User&quot;))).click()

// Step 22: Scroll the page


[Link](&quot;[Link](0, 62)&quot;)

// Step 23: Click on the confirmation button


[Link]([Link]([Link](&quot;.swal2-
confirm&quot;))).click()

// Step 24: Click on the button

[Link]([Link]([Link](&quot;button:nth-
child(3)&quot;))).click()

} catch (Exception e) {
[Link]()
} finally {
// Close the browser
[Link]()
}</stringProp>
<stringProp name="[Link]"></stringProp>
<stringProp name="[Link]">groovy</stringProp>
</[Link]>
<hashTree/>
<ResultCollector guiclass="SummaryReport" testclass="ResultCollector"
testname="Summary Report" enabled="true">
<boolProp name="ResultCollector.error_logging">false</boolProp>
<objProp>
<name>saveConfig</name>
<value class="SampleSaveConfiguration">
<time>true</time>
<latency>true</latency>
<timestamp>true</timestamp>
<success>true</success>
<label>true</label>
<code>true</code>
<message>true</message>
<threadName>true</threadName>
<dataType>true</dataType>
<encoding>false</encoding>
<assertions>true</assertions>
<subresults>true</subresults>
<responseData>false</responseData>
<samplerData>false</samplerData>
<xml>false</xml>
<fieldNames>true</fieldNames>
<responseHeaders>false</responseHeaders>
<requestHeaders>false</requestHeaders>
<responseDataOnError>false</responseDataOnError>

<saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
<assertionsResultsToSave>0</assertionsResultsToSave>
<bytes>true</bytes>
<sentBytes>true</sentBytes>
<url>true</url>
<threadCounts>true</threadCounts>
<idleTime>true</idleTime>
<connectTime>true</connectTime>
</value>
</objProp>
<stringProp name="filename"></stringProp>
</ResultCollector>
<hashTree/>
</hashTree>
</hashTree>
</hashTree>
</jmeterTestPlan>

You might also like