无法通过PowerShell在网站上的textarea中添加值 [英] Unable to add value in a textarea on a website through powershell

查看:69
本文介绍了无法通过PowerShell在网站上的textarea中添加值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我通过PowerShell自动化我们的网络浏览器任务。我在页面上有一个文本区域,我们插入事件proc,然后单击提交。我可以在文本区域添加文本值,它也会填充在IE窗口页面上,但是当我点击确认全部通过powershell时,它会显示错误,请输入一个值。



但是,如果尝试手动在文本区域添加相同的事件proc并单击确认。它有效。



PS脚本:



??($ obj.Document.getElementsByTagName(textarea )| select -First 1).value =Events(Startup).group = add + = Administrators / g = A645121

#click on confirm

$ conf = $ obj.Document.getElementsByTagName(button)| Where-Object {$ _。innertext -eq'confify'}

$ conf.click()





HTML元素详细信息:



< textarea data-bind =value:CacheDbControlData,valueUpdate:['afterpaste'],禁用:!isSelectedClass('unformatted' )>< / textarea>



任何帮助都会非常感激。







问候,



Javed



< b>我尝试了什么:



PS脚本:



??($ obj.Document.getElementsByTagName(textarea)| select -First 1).value =Events(Startup).group = add + = Administrators / g = A645121

#click on confirm

$ conf = $ obj.Document.getElementsByTagName(button)| Where-Object {$ _。innertext -eq'confify'}

$ conf.click()

Hi,

I am automating our web browser task through powershell. I have a text area on a page where we insert our event proc and then click on submit. I am able to add the text value on the text area and it populates on the IE window page as well but when I click confirm it all through powershell it shows error saying, Please enter a value.

However, If a try adding the same event proc on the text area manually and click confirm. it works.

PS Script:

??($obj.Document.getElementsByTagName("textarea") | select -First 1 ).value = "Events(Startup).group=add+=Administrators /g=A645121"
#click on confirm
$conf = $obj.Document.getElementsByTagName("button") | Where-Object {$_.innertext -eq 'Confirm'}
$conf.click()


HTML Element details:

<textarea data-bind="value: CacheDbControlData, valueUpdate: ['afterpaste'], disable: !isSelectedClass('unformatted')"></textarea>

Any help would be really appreciated.



Regards,

Javed

What I have tried:

PS Script:

??($obj.Document.getElementsByTagName("textarea") | select -First 1 ).value = "Events(Startup).group=add+=Administrators /g=A645121"
#click on confirm
$conf = $obj.Document.getElementsByTagName("button") | Where-Object {$_.innertext -eq 'Confirm'}
$conf.click()

推荐答案

obj.Document.getElementsByTagName (textarea)| select -First 1).value =Events(Startup).group = add + = Administrators / g = A645121

#click on confirm
obj.Document.getElementsByTagName("textarea") | select -First 1 ).value = "Events(Startup).group=add+=Administrators /g=A645121"
#click on confirm


conf =


obj.Document.getElementsByTagName(button)| Where-Object {
obj.Document.getElementsByTagName("button") | Where-Object {


这篇关于无法通过PowerShell在网站上的textarea中添加值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆